diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-11-14 18:01:52 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-11-14 18:02:00 +0100 |
commit | b12b2259bc4c1e0b34d4adb5c0e41b23761a5c08 (patch) | |
tree | 2ba710e251093b204af6e53860c9d3e8223e1d03 /sound/usb/validate.c | |
parent | ALSA: au88x0: Fix incorrect device pointer for preallocation (diff) | |
parent | ALSA: usb-audio: Fix incorrect size check for processing/extension units (diff) | |
download | linux-b12b2259bc4c1e0b34d4adb5c0e41b23761a5c08.tar.xz linux-b12b2259bc4c1e0b34d4adb5c0e41b23761a5c08.zip |
Merge branch 'for-linus' into for-next
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/validate.c')
-rw-r--r-- | sound/usb/validate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/usb/validate.c b/sound/usb/validate.c index a5e584b60dcd..389e8657434a 100644 --- a/sound/usb/validate.c +++ b/sound/usb/validate.c @@ -81,9 +81,9 @@ static bool validate_processing_unit(const void *p, switch (v->protocol) { case UAC_VERSION_1: default: - /* bNrChannels, wChannelConfig, iChannelNames, bControlSize */ - len += 1 + 2 + 1 + 1; - if (d->bLength < len) /* bControlSize */ + /* bNrChannels, wChannelConfig, iChannelNames */ + len += 1 + 2 + 1; + if (d->bLength < len + 1) /* bControlSize */ return false; m = hdr[len]; len += 1 + m + 1; /* bControlSize, bmControls, iProcessing */ |