summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/gdth.c
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2010-03-11 14:09:35 -0800
committerJames Bottomley <James.Bottomley@suse.de>2010-04-11 09:23:31 -0500
commit6ce00cae684e7c6310e14634320184ca3c011750 (patch)
treeabb0e1d37e46a6bbe3a52f52cbc257083fe875b2 /drivers/scsi/gdth.c
parente05a9e7b18dfcce6911d0b901d7f04387cc1d93c (diff)
downloadop-kernel-dev-6ce00cae684e7c6310e14634320184ca3c011750.zip
op-kernel-dev-6ce00cae684e7c6310e14634320184ca3c011750.tar.gz
[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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
index 35a4b30..a765fe7 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++;
}
OpenPOWER on IntegriCloud