summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-12-08 14:08:57 -0800
committerJames Bottomley <James.Bottomley@suse.de>2010-01-18 10:48:07 -0600
commit8fe79162a6807bf120140d64e96da54fc273b88b (patch)
tree38f4b359db19dbda5caa4baf8c40eb1c1b03b303
parent9b7dac086bec7c71722d6e79464609e17f0996e7 (diff)
downloadtalos-obmc-linux-8fe79162a6807bf120140d64e96da54fc273b88b.tar.gz
talos-obmc-linux-8fe79162a6807bf120140d64e96da54fc273b88b.zip
[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.c2
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)
OpenPOWER on IntegriCloud