]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
ALSA: usb-audio: Fix possible NULL dereference at create_yamaha_midi_quirk()
authorTakashi Iwai <tiwai@suse.de>
Mon, 26 Aug 2019 11:55:21 +0000 (13:55 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 4 Dec 2019 09:29:26 +0000 (10:29 +0100)
commitec303aa9ca1dbee494ff04dfc20e04122b2c61ee
tree6505f871ddea7d397c9811ec80a4d5938f2c387c
parenta5dc9f14604e6036759ddc3deb0e566fe9a6679a
ALSA: usb-audio: Fix possible NULL dereference at create_yamaha_midi_quirk()

BugLink: https://bugs.launchpad.net/bugs/1852338
commit 60849562a5db4a1eee2160167e4dce4590d3eafe upstream.

The previous addition of descriptor validation may lead to a NULL
dereference at create_yamaha_midi_quirk() when either injd or outjd is
NULL.  Add proper non-NULL checks.

Fixes: 57f8770620e9 ("ALSA: usb-audio: More validations of descriptor units")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
sound/usb/quirks.c