mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
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 <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>
This commit is contained in:
parent
1909b64303
commit
a018d1cf99
|
|
@ -4157,7 +4157,7 @@ static void validate_options(void)
|
|||
*/
|
||||
static int __init st_setup(char *str)
|
||||
{
|
||||
int i, len, ints[5];
|
||||
int i, len, ints[ARRAY_SIZE(parms) + 1];
|
||||
char *stp;
|
||||
|
||||
stp = get_options(str, ARRAY_SIZE(ints), ints);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user