summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaruch Siach <baruch@tkos.co.il>2010-10-11 11:19:38 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-10-12 13:04:56 +0300
commit87440f3e55354db45a739d934913c7d60263bf95 (patch)
tree09460a7623014aaeee57fea260721f11305bb881
parentfec81abd9593fe11ba8577d38e4143e5708e3343 (diff)
nanddump: fix initialization of bad blocks oob data buffer
When dumping oob data of a bad block, initialize oobbuf with 0xff, instead of readbuf. This avoids bogus oob data on output. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
-rw-r--r--nanddump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nanddump.c b/nanddump.c
index 3589931..b7341a5 100644
--- a/nanddump.c
+++ b/nanddump.c
@@ -452,7 +452,7 @@ int main(int argc, char * const argv[])
continue;
if (badblock) {
- memset (readbuf, 0xff, meminfo.oobsize);
+ memset(oobbuf, 0xff, meminfo.oobsize);
} else {
/* Read OOB data and exit on failure */
oob.start = ofs;