Patch "ALSA: usb-audio: Add check return value for usb_string()" has been added to the 4.4-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
ALSA: usb-audio: Add check return value for usb_string()
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
alsa-usb-audio-add-check-return-value-for-usb_string.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
89b89d121ffcf8d9546633b98ded9d18b8f75891Mon Sep 17 00:00:00 2001
From: Jaejoong Kim <[email protected]>
Date: Mon, 4 Dec 2017 15:31:49 +0900
Subject: ALSA: usb-audio: Add check return value for usb_string()
From: Jaejoong Kim <[email protected]>
commit 89b89d121ffcf8d9546633b98ded9d18b8f75891 upstream.
snd_usb_copy_string_desc() returns zero if usb_string() fails. In case of failure, we need to check the snd_usb_copy_string_desc()'s return value and add an exception case
--- sound/usb/mixer.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
sound/usb/mixer.c +5 -4
@@ -2106,13 +2106,14 @@ static int parse_audio_selector_unit(strif (len) ;else if (nameid) -snd_usb_copy_string_desc (state, nameid, kctl->id.name, + len =snd_usb_copy_string_desc (state, nameid, kctl->id.name,sizeof (kctl->id.name)); -else { +else len =get_term_name (state, &state->oterm, kctl->id.name,sizeof (kctl->id.name),0 ); -if (!len) -strlcpy (kctl->id.name,"USB" ,sizeof (kctl->id.name)); + +if (!len) { +strlcpy (kctl->id.name,"USB" ,sizeof (kctl->id.name));if (desc->bDescriptorSubtype ==UAC2_CLOCK_SELECTOR )append_ctl_name (kctl," Clock Source" );
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/alsa-usb-audio-add-check-return-value-for-usb_string.patch queue-4.4/alsa-usb-audio-fix-out-of-bound-error.patch