[PATCH] nanddump: fix initialization of bad blocks oob data buffer
Baruch Siach
baruch at tkos.co.il
Mon Oct 11 05:19:38 EDT 2010
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 at tkos.co.il>
---
nanddump.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/nanddump.c b/nanddump.c
index 3589931..0fdf736 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;
--
1.7.1
More information about the linux-mtd
mailing list