diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-12-08 17:08:57 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-01-18 11:48:07 -0500 |
commit | 8fe79162a6807bf120140d64e96da54fc273b88b (patch) | |
tree | 38f4b359db19dbda5caa4baf8c40eb1c1b03b303 | |
parent | 9b7dac086bec7c71722d6e79464609e17f0996e7 (diff) |
[SCSI] eata: fix buffer overflow
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>
-rw-r--r-- | drivers/scsi/eata.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c index c7076ce25e21..3c5abf7cd762 100644 --- a/drivers/scsi/eata.c +++ b/drivers/scsi/eata.c | |||
@@ -1509,7 +1509,7 @@ static int option_setup(char *str) | |||
1509 | char *cur = str; | 1509 | char *cur = str; |
1510 | int i = 1; | 1510 | int i = 1; |
1511 | 1511 | ||
1512 | while (cur && isdigit(*cur) && i <= MAX_INT_PARAM) { | 1512 | while (cur && isdigit(*cur) && i < MAX_INT_PARAM) { |
1513 | ints[i++] = simple_strtoul(cur, NULL, 0); | 1513 | ints[i++] = simple_strtoul(cur, NULL, 0); |
1514 | 1514 | ||
1515 | if ((cur = strchr(cur, ',')) != NULL) | 1515 | if ((cur = strchr(cur, ',')) != NULL) |