1 From: Baruch Siach <baruch@tkos.co.il>
2 Date: Mon, 11 Oct 2010 09:19:38 +0000 (+0200)
3 Subject: nanddump: fix initialization of bad blocks oob data buffer
4 X-Git-Url: http://git.infradead.org
6 nanddump: fix initialization of bad blocks oob data buffer
8 When dumping oob data of a bad block, initialize oobbuf with 0xff, instead of
9 readbuf. This avoids bogus oob data on output.
11 Signed-off-by: Baruch Siach <baruch@tkos.co.il>
12 Acked-by: Mike Frysinger <vapier@gentoo.org>
13 Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
16 diff --git a/nanddump.c b/nanddump.c
17 index 3589931..b7341a5 100644
20 @@ -452,7 +452,7 @@ int main(int argc, char * const argv[])
24 - memset (readbuf, 0xff, meminfo.oobsize);
25 + memset(oobbuf, 0xff, meminfo.oobsize);
27 /* Read OOB data and exit on failure */