* [PATCH] gdth: Buffer overflow
@ 2009-07-28 10:24 Roel Kluin
0 siblings, 0 replies; only message in thread
From: Roel Kluin @ 2009-07-28 10:24 UTC (permalink / raw)
To: James.Bottomley, linux-scsi, Andrew Morton
This allows i == MAXHA, which is out of range
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
index 185e6bc..0c64940 100644
--- a/drivers/scsi/gdth.c
+++ b/drivers/scsi/gdth.c
@@ -3841,7 +3841,7 @@ int __init option_setup(char *str)
TRACE2(("option_setup() str %s
", 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++;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-07-28 10:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-28 10:24 [PATCH] gdth: Buffer overflow Roel Kluin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.