[pulseaudio-discuss] [pa-ucm] SIGABORT in ucm_get_modifiers

sajeesh sidharthan sajeesh.sidharthan at yahoo.com
Mon Jun 17 06:12:36 PDT 2013


Ths change fixed SIGABORT.


diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c
index 3b55e82..1156ffa 100644
--- a/src/modules/alsa/alsa-ucm.c
+++ b/src/modules/alsa/alsa-ucm.c
@@ -361,7 +361,7 @@ static int ucm_get_modifier_property(pa_alsa_ucm_modifier *modifier, snd_use_cas
 /* Create a list of devices for this verb */
 static int ucm_get_devices(pa_alsa_ucm_verb *verb, snd_use_case_mgr_t *uc_mgr) {
-    const char **dev_list;
+    const char **dev_list = NULL;
     int num_dev, i;
     num_dev = snd_use_case_get_list(uc_mgr, "_devices", &dev_list);
@@ -384,7 +384,7 @@ static int ucm_get_devices(pa_alsa_ucm_verb *verb, snd_use_case_mgr_t *uc_mgr) {
 static int ucm_get_modifiers(pa_alsa_ucm_verb *verb, snd_use_case_mgr_t *uc_mgr) {
-    const char **mod_list;
+    const char **mod_list = NULL;
     int num_mod, i;
     num_mod = snd_use_case_get_list(uc_mgr, "_modifiers", &mod_list);



 From: sajeesh sidharthan <sajeesh.sidharthan at yahoo.com>
To: "pulseaudio-discuss at lists.freedesktop.org" <pulseaudio-discuss at lists.freedesktop.org> 
Sent: Sunday, June 16, 2013 11:53 AM
Subject: [pa-ucm] SIGABORT in ucm_get_modifiers


I have come across SIGABORT in pulse-ucm module.

 happened due to freeing memory of uninitialized pointer in 
ucm_get_modifiers(). If modifier list count is 0, alsa-ucm doesnt return
 error and doesnt allocate memory for modifier list.

In ucm_get_modifiers, mod_list is uninitialized and this leads to 
freeing memory which is not allocated inside alsa-ucm, by calling 

Please let me know if I can checkin the code to fix the crash./Sajeesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20130617/ed7e09af/attachment-0001.html>

More information about the pulseaudio-discuss mailing list