mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 03:45:24 -04:00
ALSA: usb-audio: Fix size validation in convert_chmap_v3()
[ Upstream commit 89f0addeee3cb2dc49837599330ed9c4612f05b0 ]
The "p" pointer is void so sizeof(*p) is 1. The intent was to check
sizeof(*cs_desc), which is 3, instead.
Fixes: ecfd41166b72 ("ALSA: usb-audio: Validate UAC3 cluster segment descriptors")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/aKL5kftC1qGt6lpv@stanley.mountain
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
d0225f41ee
commit
6cd6e75cf9
1 changed files with 1 additions and 1 deletions
|
|
@ -350,7 +350,7 @@ snd_pcm_chmap_elem *convert_chmap_v3(struct uac3_cluster_header_descriptor
|
|||
u16 cs_len;
|
||||
u8 cs_type;
|
||||
|
||||
if (len < sizeof(*p))
|
||||
if (len < sizeof(*cs_desc))
|
||||
break;
|
||||
cs_len = le16_to_cpu(cs_desc->wLength);
|
||||
if (len < cs_len)
|
||||
|
|
|
|||
Loading…
Reference in a new issue