Home Home > GIT Browse > SLE12-SP5-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Thumshirn <jthumshirn@suse.de>2019-08-20 13:05:55 +0200
committerJohannes Thumshirn <jthumshirn@suse.de>2019-08-20 13:05:55 +0200
commit2f04c0e04f39e256fd2fec110229db2e9c1e4f2b (patch)
treeff5a3fd7b52012569a554262692e64293b96de67
parent39b4818fbb8bf9538da274f29b24e185aade1463 (diff)
parent7a4dd78117af582f098c38eaa68ee4843e7b7d4b (diff)
Merge remote-tracking branch 'origin/SLE15-SP1' into SLE12-SP5
Conflicts: kabi/severities patches.drivers/ALSA-usb-audio-Fix-a-stack-buffer-overflow-bug-in-ch.patch patches.drivers/ALSA-usb-audio-Fix-an-OOB-bug-in-parse_audio_mixer_u.patch patches.fixes/mac80211-don-t-WARN-on-short-WMM-parameters-from-AP.patch suse-commit: 81777d6aa92760ae90507a076b4035fc0d4862a8
-rw-r--r--sound/usb/mixer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index da00d6742b48..a26f7005a48d 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -754,6 +754,8 @@ static int uac_mixer_unit_get_channels(struct mixer_build *state,
return -EINVAL;
if (!desc->bNrInPins)
return -EINVAL;
+ if (desc->bLength < sizeof(*desc) + desc->bNrInPins)
+ return -EINVAL;
switch (state->mixer->protocol) {
case UAC_VERSION_1:
@@ -1001,6 +1003,7 @@ static int __check_input_term(struct mixer_build *state, int id,
return -ENODEV;
}
+
static int check_input_term(struct mixer_build *state, int id,
struct usb_audio_term *term)
{
@@ -2134,9 +2137,6 @@ static int parse_audio_mixer_unit(struct mixer_build *state, int unitid,
num_outs = err;
input_pins = desc->bNrInPins;
- if (desc->bLength < sizeof(*desc) + desc->bNrInPins)
- return -EINVAL;
-
num_ins = 0;
ich = 0;
for (pin = 0; pin < input_pins; pin++) {