summaryrefslogtreecommitdiffstats
path: root/sound/usb/validate.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-11-14 18:01:52 +0100
committerTakashi Iwai <tiwai@suse.de>2019-11-14 18:02:00 +0100
commitb12b2259bc4c1e0b34d4adb5c0e41b23761a5c08 (patch)
tree2ba710e251093b204af6e53860c9d3e8223e1d03 /sound/usb/validate.c
parentALSA: au88x0: Fix incorrect device pointer for preallocation (diff)
parentALSA: usb-audio: Fix incorrect size check for processing/extension units (diff)
downloadlinux-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.c6
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 */