Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "ALSA: usb-audio: Fix potential zero-division at parsing FU"

The commit 8428a8ebde2d ("ALSA: usb-audio: Fix potential zero-division
at parsing FU") is utterly bogus and breaks the case with csize=1
instead of fixing anything. Just take it back again.

Reported-by: Jörg Otte <jrg.otte@gmail.com>
Fixes: 8428a8ebde2d ("ALSA: usb-audio: Fix potential zero-division at parsing FU"
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Takashi Iwai and committed by
Linus Torvalds
3c02a6d9 8f5abe84

+2 -2
+2 -2
sound/usb/mixer.c
··· 1476 1476 return -EINVAL; 1477 1477 } 1478 1478 csize = hdr->bControlSize; 1479 - if (csize <= 1) { 1479 + if (!csize) { 1480 1480 usb_audio_dbg(state->chip, 1481 - "unit %u: invalid bControlSize <= 1\n", 1481 + "unit %u: invalid bControlSize == 0\n", 1482 1482 unitid); 1483 1483 return -EINVAL; 1484 1484 }