diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2010-03-12 01:09:35 +0300 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-04-11 18:23:31 +0400 |
commit | 6ce00cae684e7c6310e14634320184ca3c011750 (patch) | |
tree | abb0e1d37e46a6bbe3a52f52cbc257083fe875b2 /drivers/scsi | |
parent | e05a9e7b18dfcce6911d0b901d7f04387cc1d93c (diff) | |
download | linux-6ce00cae684e7c6310e14634320184ca3c011750.tar.xz |
[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')
-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 35a4b3073ec3..a765fe7a55c3 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++; } |