Commit ba8bf096 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: usb-audio: Fix copy&paste error in the validator

The recently introduced USB-audio descriptor validator had a stupid
copy&paste error that may lead to an unexpected overlook of too short
descriptors for processing and extension units.  It's likely the cause
of the report triggered by syzkaller fuzzer.  Let's fix it.

Fixes: 57f87706 ("ALSA: usb-audio: More validations of descriptor units")
Link: default avatarTakashi Iwai <>
parent c8d2dcb3
......@@ -75,7 +75,7 @@ static bool validate_processing_unit(const void *p,
if (d->bLength < sizeof(*d))
return false;
len = d->bLength < sizeof(*d) + d->bNrInPins;
len = sizeof(*d) + d->bNrInPins;
if (d->bLength < len)
return false;
switch (v->protocol) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment