Skip to contentSkip to conversation

scsi/eata: fix buffer overflow

PATCH In review [email protected] 1 participant 1 message Nov 17, 2009 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 4/18 scsi/eata: fix buffer overflow

From: Roel Kluin <[email protected]>

Allows i == MAX_INT_PARAM, which is out of range.

Cc Michael Neuffer <[email protected]>
Cc Dario Ballabio <[email protected]>
Cc James E.J. Bottomley <[email protected]>

---

 drivers/scsi/eata.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/eata.c renamed from drivers/scsi/eata.c~scsi-eata-fix-buffer-overflow +1 -1
diff -puN drivers/scsi/eata.c~scsi-eata-fix-buffer-overflow drivers/scsi/eata.c
@@ -1509,7 +1509,7 @@ static int option_setup(char *str)
 	char *cur = str;
 	int i = 1;
 
-	while (cur && isdigit(*cur) && i <= MAX_INT_PARAM) {
+	while (cur && isdigit(*cur) && i < MAX_INT_PARAM) {
 		ints[i++] = simple_strtoul(cur, NULL, 0);
 
 		if ((cur = strchr(cur, ',')) != NULL)

_