Skip to content

Commit e4d1ca0

Browse files
kmakisaragregkh
authored andcommitted
scsi: st: Fix array overflow in st_setup()
[ Upstream commit a018d1c ] Change the array size to follow parms size instead of a fixed value. Reported-by: Chenyuan Yang <chenyuan0y@gmail.com> Closes: https://lore.kernel.org/linux-scsi/CALGdzuoubbra4xKOJcsyThdk5Y1BrAmZs==wbqjbkAgmKS39Aw@mail.gmail.com/ Signed-off-by: Kai Mäkisara <Kai.Makisara@kolumbus.fi> Link: https://lore.kernel.org/r/20250311112516.5548-2-Kai.Makisara@kolumbus.fi Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 06f20cd commit e4d1ca0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/scsi/st.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4120,7 +4120,7 @@ static void validate_options(void)
41204120
*/
41214121
static int __init st_setup(char *str)
41224122
{
4123-
int i, len, ints[5];
4123+
int i, len, ints[ARRAY_SIZE(parms) + 1];
41244124
char *stp;
41254125

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

0 commit comments

Comments
 (0)