diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-07-31 14:47:58 +0200 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-09-04 09:40:09 +0100 |
commit | 269c0ee66367b11de9758ee64ea039843f0c7cad (patch) | |
tree | bf093868a97d039662c025808828bde2c6983cda /drivers/mtd/devices/slram.c | |
parent | ad4fbc7921bd7cca108ecc1340a014e91ecc8536 (diff) | |
download | blackbird-obmc-linux-269c0ee66367b11de9758ee64ea039843f0c7cad.tar.gz blackbird-obmc-linux-269c0ee66367b11de9758ee64ea039843f0c7cad.zip |
slram: Read buffer overflow
map[count] is checked before count < SLRAM_MAX_DEVICES_PARAMS
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>
Diffstat (limited to 'drivers/mtd/devices/slram.c')
-rw-r--r-- | drivers/mtd/devices/slram.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/devices/slram.c b/drivers/mtd/devices/slram.c index 00248e81ecd5..239500b0b751 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++) { } |