From: Jiri Slaby Date: Sun, 17 Feb 2013 13:33:04 +0000 (+0100) Subject: ALSA: usb/quirks, fix out-of-bounds access X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4909a0caabb8b4352efcea223e58b86f8bc1f98b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ALSA: usb/quirks, fix out-of-bounds access bootresponse in snd_usb_mbox2_boot_quirk is only 12 (decimal) u8's long, but i9s passed to snd_usb_ctl_msg as it would be 0x12 (hexa) long. Fix that by having proper size of the array, i.e. 0x12. Signed-off-by: Jiri Slaby Cc: Signed-off-by: Takashi Iwai --- diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index 7d7ad0b0620e..5325a3869bb7 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -533,7 +533,7 @@ static int snd_usb_mbox2_boot_quirk(struct usb_device *dev) { struct usb_host_config *config = dev->actconfig; int err; - u8 bootresponse[12]; + u8 bootresponse[0x12]; int fwsize; int count;