Skip to content

Commit a018d1c

Browse files
kmakisaramartinkpetersen
authored andcommitted
scsi: st: Fix array overflow in st_setup()
Change the array size to follow parms size instead of a fixed value. Reported-by: Chenyuan Yang <[email protected]> Closes: https://lore.kernel.org/linux-scsi/CALGdzuoubbra4xKOJcsyThdk5Y1BrAmZs==wbqjbkAgmKS39Aw@mail.gmail.com/ Signed-off-by: Kai Mäkisara <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 1909b64 commit a018d1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/st.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4157,7 +4157,7 @@ static void validate_options(void)
41574157
*/
41584158
static int __init st_setup(char *str)
41594159
{
4160-
int i, len, ints[5];
4160+
int i, len, ints[ARRAY_SIZE(parms) + 1];
41614161
char *stp;
41624162

41634163
stp = get_options(str, ARRAY_SIZE(ints), ints);

0 commit comments

Comments
 (0)