Skip to content

Commit

Permalink
slram: Read buffer overflow
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roel Kluin authored and David Woodhouse committed Sep 4, 2009
1 parent ad4fbc7 commit 269c0ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/devices/slram.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
}

Expand Down

0 comments on commit 269c0ee

Please sign in to comment.