]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: US16x08: Move overflow check before array access
authorDaniil Dementev <d.dementev@ispras.ru>
Fri, 10 Jun 2022 16:57:32 +0000 (19:57 +0300)
committerTakashi Iwai <tiwai@suse.de>
Mon, 13 Jun 2022 05:40:08 +0000 (07:40 +0200)
commit8ccddb09ae1cdc879f759bb7a5bdd2a5e1332893
treeda607f141fcd72640a7dbaf19ec6345f7599a13a
parent68329fbf505b0786322b17a8220c8e584c0f94f4
ALSA: usb-audio: US16x08: Move overflow check before array access

Buffer overflow could occur in the loop "while", due to accessing an
array element before checking the index.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Daniil Dementev <d.dementev@ispras.ru>
Reviewed-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Link: https://lore.kernel.org/r/20220610165732.2904-1-d.dementev@ispras.ru
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/mixer_us16x08.c