ibmmca: fix buffer overflow
PATCH 6/11 ibmmca: fix buffer overflow
From: Roel Kluin <[email protected]>
Allows i == IM_MAX_HOSTS, which is out of range.
Signed-off-by Roel Kluin <[email protected]>
Cc Michael Lang <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/scsi/ibmmca.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ibmmca.c renamed from drivers/scsi/ibmmca.c~ibmmca-buffer-overflow +1 -1
@@ -2335,7 +2335,7 @@ static int option_setup(char *str)char *cur = str;int i =1 ; -while (cur &&isdigit (*cur) && i <=IM_MAX_HOSTS ) { +while (cur &&isdigit (*cur) && i <IM_MAX_HOSTS ) { ints[i++] =simple_strtoul (cur,NULL ,0 );if ((cur =strchr (cur,',' )) !=NULL ) cur++;
_