diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2010-03-11 14:09:35 -0800 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-04-11 09:23:31 -0500 |
commit | 6ce00cae684e7c6310e14634320184ca3c011750 (patch) | |
tree | abb0e1d37e46a6bbe3a52f52cbc257083fe875b2 /drivers/scsi/gdth.c | |
parent | e05a9e7b18dfcce6911d0b901d7f04387cc1d93c (diff) |
[SCSI] gdth: fix buffer overflow
This allows i == MAXHA, 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/gdth.c')
-rw-r--r-- | drivers/scsi/gdth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c index 35a4b3073ec..a765fe7a55c 100644 --- a/drivers/scsi/gdth.c +++ b/drivers/scsi/gdth.c @@ -3842,7 +3842,7 @@ int __init option_setup(char *str) TRACE2(("option_setup() str %s\n", str ? str:"NULL")); - while (cur && isdigit(*cur) && i <= MAXHA) { + while (cur && isdigit(*cur) && i < MAXHA) { ints[i++] = simple_strtoul(cur, NULL, 0); if ((cur = strchr(cur, ',')) != NULL) cur++; } |