alsa-lib/src/ucm
Antonio Ospite 4ec907c773 ucm: fix crash when calling snd_use_case_geti() with no device or modifier
When calling snd_use_case_geti(uc_mgr, "_devstatus", &lvalue) the code
ends up calling device_status(uc_mgr, NULL), which result in a crash in
strcmp(dev->name, NULL), when there are enabled devices.

This happens because snd_use_case_geti() allows a "_devstatus"
identifier even if it's only supposed to allow the form
"_devstatus/{device}".

So check that the device name is not null.

The same issue occurs with "_modstatus", this change fixes that as well.

Signed-off-by: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-09-29 09:55:08 +02:00
..
main.c ucm: fix crash when calling snd_use_case_geti() with no device or modifier 2016-09-29 09:55:08 +02:00
Makefile.am autotools: update style 2014-02-26 08:16:22 +01:00
parser.c ucm: add cset-tlv 2016-04-13 15:40:17 +02:00
ucm_local.h ucm: add cset-tlv 2016-04-13 15:40:17 +02:00
utils.c UCM: Implement ConflictingDevices, add device list to devices 2011-06-08 18:20:26 +02:00