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>
This commit is contained in:
Roel Kluin 2009-07-31 14:47:58 +02:00 committed by David Woodhouse
parent ad4fbc7921
commit 269c0ee663

View file

@ -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++) {
}