diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-12-08 14:08:57 -0800 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-01-18 10:48:07 -0600 |
commit | 8fe79162a6807bf120140d64e96da54fc273b88b (patch) | |
tree | 38f4b359db19dbda5caa4baf8c40eb1c1b03b303 /drivers/scsi | |
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>
Diffstat (limited to 'drivers/scsi')
-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) 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) |