Skip to content

Commit

Permalink
ALSA: usb/quirks, fix out-of-bounds access
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
Jiri Slaby authored and tiwai committed Feb 17, 2013
1 parent c881f80 commit 4909a0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/usb/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 4909a0c

Please sign in to comment.