mtd: tests: fix read buffer overflows
authorRoel Kluin <roel.kluin@gmail.com>
Fri, 31 Jul 2009 14:21:01 +0000 (16:21 +0200)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 4 Sep 2009 08:40:17 +0000 (09:40 +0100)
commitc6f7e7beb9e6a64816f534a3a0dd0cfa4937f1fe
treec0fed3deeb9862dffac83ac45814e70341317c2e
parent269c0ee66367b11de9758ee64ea039843f0c7cad
mtd: tests: fix read buffer overflows

Check whether index is within bounds before testing the element.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/tests/mtd_oobtest.c
drivers/mtd/tests/mtd_pagetest.c