From 87440f3e55354db45a739d934913c7d60263bf95 Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Mon, 11 Oct 2010 11:19:38 +0200 Subject: 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 Acked-by: Mike Frysinger Signed-off-by: Artem Bityutskiy --- nanddump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3