]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ALSA: usb/quirks, fix out-of-bounds access
authorJiri Slaby <jslaby@suse.cz>
Sun, 17 Feb 2013 13:33:04 +0000 (14:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Feb 2013 13:38:33 +0000 (05:38 -0800)
commit 4909a0caabb8b4352efcea223e58b86f8bc1f98b upstream.

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 <jslaby@suse.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/usb/quirks.c

index 2c971858d6b70a146e57266bfa0afe7a1bfe80cb..01152893515f9e2da1fffa5431c99e7b941c962a 100644 (file)
@@ -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;