tools/e2fsprogs: update to e2fsprogs-1.41.12
[openwrt/openwrt.git] / tools / mtd-utils / patches / 000-upstream_nanddump.patch
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
5
6 nanddump: fix initialization of bad blocks oob data buffer
7
8 When dumping oob data of a bad block, initialize oobbuf with 0xff, instead of
9 readbuf. This avoids bogus oob data on output.
10
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>
14 ---
15
16 diff --git a/nanddump.c b/nanddump.c
17 index 3589931..b7341a5 100644
18 --- a/nanddump.c
19 +++ b/nanddump.c
20 @@ -452,7 +452,7 @@ int main(int argc, char * const argv[])
21 continue;
22
23 if (badblock) {
24 - memset (readbuf, 0xff, meminfo.oobsize);
25 + memset(oobbuf, 0xff, meminfo.oobsize);
26 } else {
27 /* Read OOB data and exit on failure */
28 oob.start = ofs;