From: Roel Kluin Date: Fri, 31 Jul 2009 12:47:58 +0000 (+0200) Subject: slram: Read buffer overflow X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=269c0ee66367b11de9758ee64ea039843f0c7cad;p=linux-edison.git slram: Read buffer overflow map[count] is checked before count < SLRAM_MAX_DEVICES_PARAMS Signed-off-by: Roel Kluin Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/devices/slram.c b/drivers/mtd/devices/slram.c index 00248e81ecd..239500b0b75 100644 --- a/drivers/mtd/devices/slram.c +++ b/drivers/mtd/devices/slram.c @@ -341,7 +341,7 @@ static int init_slram(void) #else int count; - for (count = 0; (map[count]) && (count < SLRAM_MAX_DEVICES_PARAMS); + for (count = 0; count < SLRAM_MAX_DEVICES_PARAMS && map[count]; count++) { }