diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2010-03-11 23:09:35 +0100 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-04-11 16:23:31 +0200 |
commit | 6ce00cae684e7c6310e14634320184ca3c011750 (patch) | |
tree | abb0e1d37e46a6bbe3a52f52cbc257083fe875b2 /drivers/scsi/gdth.c | |
parent | [SCSI] pm8001: drop redundant memset (diff) | |
download | linux-6ce00cae684e7c6310e14634320184ca3c011750.tar.xz linux-6ce00cae684e7c6310e14634320184ca3c011750.zip |
[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 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++; } |