Skip to content

Commit

Permalink
[SCSI] eata: fix buffer overflow
Browse files Browse the repository at this point in the history
Allows i == MAX_INT_PARAM, which is out of range.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Roel Kluin authored and James Bottomley committed Jan 18, 2010
1 parent 9b7dac0 commit 8fe7916
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/eata.c
Original file line number Diff line number Diff line change
Expand Up @@ -1509,7 +1509,7 @@ static int option_setup(char *str)
char *cur = str;
int i = 1;

while (cur && isdigit(*cur) && i <= MAX_INT_PARAM) {
while (cur && isdigit(*cur) && i < MAX_INT_PARAM) {
ints[i++] = simple_strtoul(cur, NULL, 0);

if ((cur = strchr(cur, ',')) != NULL)
Expand Down

0 comments on commit 8fe7916

Please sign in to comment.