Skip to content

Commit f026a80

Browse files
kmakisaravijay-suman
authored andcommitted
scsi: st: Fix array overflow in st_setup()
[ Upstream commit a018d1cf990d0c339fe0e29b762ea5dc10567d67 ] 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]> Signed-off-by: Sasha Levin <[email protected]> (cherry picked from commit c6015d0f7a2236ddb3928b2dfcb1c556a1368b55) Signed-off-by: Vijayendra Suman <[email protected]>
1 parent a2388c4 commit f026a80

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
@@ -4109,7 +4109,7 @@ static void validate_options(void)
41094109
*/
41104110
static int __init st_setup(char *str)
41114111
{
4112-
int i, len, ints[5];
4112+
int i, len, ints[ARRAY_SIZE(parms) + 1];
41134113
char *stp;
41144114

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

0 commit comments

Comments
 (0)