Skip to content

Commit 164f6cb

Browse files
kmakisarajfvogel
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 7fe3b4deed8b93609058c37c9a11df1d2b2c0423) Signed-off-by: Jack Vogel <[email protected]>
1 parent 484b036 commit 164f6cb

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
@@ -4119,7 +4119,7 @@ static void validate_options(void)
41194119
*/
41204120
static int __init st_setup(char *str)
41214121
{
4122-
int i, len, ints[5];
4122+
int i, len, ints[ARRAY_SIZE(parms) + 1];
41234123
char *stp;
41244124

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

0 commit comments

Comments
 (0)