drivers/scsi/gdth.c: fix buffer overflow
PATCH 3/26 drivers/scsi/gdth.c: fix buffer overflow
From: Roel Kluin <[email protected]>
This allows i == MAXHA, which is out of range
Signed-off-by Roel Kluin <[email protected]>
Cc James Bottomley <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/scsi/gdth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/gdth.c renamed from drivers/scsi/gdth.c~drivers-scsi-gdthc-fix-buffer-overflow +1 -1
@@ -3841,7 +3841,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++; }
_