diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2010-03-11 17:09:35 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-04-11 10:23:31 -0400 |
commit | 6ce00cae684e7c6310e14634320184ca3c011750 (patch) | |
tree | abb0e1d37e46a6bbe3a52f52cbc257083fe875b2 /drivers | |
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')
-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) | |||
3842 | 3842 | ||
3843 | TRACE2(("option_setup() str %s\n", str ? str:"NULL")); | 3843 | TRACE2(("option_setup() str %s\n", str ? str:"NULL")); |
3844 | 3844 | ||
3845 | while (cur && isdigit(*cur) && i <= MAXHA) { | 3845 | while (cur && isdigit(*cur) && i < MAXHA) { |
3846 | ints[i++] = simple_strtoul(cur, NULL, 0); | 3846 | ints[i++] = simple_strtoul(cur, NULL, 0); |
3847 | if ((cur = strchr(cur, ',')) != NULL) cur++; | 3847 | if ((cur = strchr(cur, ',')) != NULL) cur++; |
3848 | } | 3848 | } |