- Backport upstream fixes: UCM updates, Broadwell UCM support, namehint fixes, fix faulty assert in PCM plugins, etc: 0001-ucm-document-some-standard-values.patch 0002-conf-ucm-broadwell-rt286-add-ucm-config.patch 0003-conf-ucm-Add-Makefile.am-for-broadwell-rt286-ucm-con.patch 0004-ucm-reformat-snd_use_case_get-doc.patch 0005-ucm-improve-jack-configuration-documentation.patch 0006-USB-audio-Sound-Blaster-HD-iec958-is-on-device-1.patch 0007-Sync-include-sound-asound.h-with-4.1-kernel.patch 0008-conf-ucm-broadwell-rt286-change-to-use-the-correct-j.patch 0009-namehint-Fix-invalid-list-access-in-snd_device_name_.patch 0010-namehint-Fix-the-listing-without-device-number.patch 0011-namehint-Fix-bad-free-with-invalid-iface-name.patch 0012-Allow-hint-for-ctl-hwdep-timer-and-seq.patch 0013-conf-Add-hint-descriptions-to-ctl-hwdep-seq-and-time.patch 0014-conf-ucm-broadwell-rt286-change-to-set-capture-volum.patch 0015-ucm-allow-multiple-devices-in-JackHWMute.patch 0016-pcm-Remove-assert-from-snd_pcm_hw_params_slave.patch OBS-URL: https://build.opensuse.org/request/show/308371 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=181
40 lines
1.3 KiB
Diff
40 lines
1.3 KiB
Diff
From 46d98392d0f832e46693c8c06b4927a5eb6f4b28 Mon Sep 17 00:00:00 2001
|
|
From: Takashi Iwai <tiwai@suse.de>
|
|
Date: Thu, 30 Apr 2015 14:38:25 +0200
|
|
Subject: [PATCH 11/16] namehint: Fix bad free with invalid iface name
|
|
|
|
Due to the uninitialized field before the error path, passing an
|
|
invalid iface argument may result in a bad free() call. Initialize
|
|
the fields properly beforehand.
|
|
|
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
---
|
|
src/control/namehint.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/control/namehint.c b/src/control/namehint.c
|
|
index 6c04143a185c..b3e646eb10af 100644
|
|
--- a/src/control/namehint.c
|
|
+++ b/src/control/namehint.c
|
|
@@ -562,6 +562,8 @@ int snd_device_name_hint(int card, const char *iface, void ***hints)
|
|
list.list = NULL;
|
|
list.count = list.allocated = 0;
|
|
list.siface = iface;
|
|
+ list.show_all = 0;
|
|
+ list.cardname = NULL;
|
|
if (strcmp(iface, "card") == 0)
|
|
list.iface = SND_CTL_ELEM_IFACE_CARD;
|
|
else if (strcmp(iface, "pcm") == 0)
|
|
@@ -581,8 +583,6 @@ int snd_device_name_hint(int card, const char *iface, void ***hints)
|
|
goto __error;
|
|
}
|
|
|
|
- list.show_all = 0;
|
|
- list.cardname = NULL;
|
|
if (snd_config_search(local_config, "defaults.namehint.showall", &conf) >= 0)
|
|
list.show_all = snd_config_get_bool(conf) > 0;
|
|
if (card >= 0) {
|
|
--
|
|
2.4.1
|
|
|