[alsa-devel] UCM list 'modifiers' Seg-Fault when list is empty
Hi,
I've been testing the Alsa UCM and find that when listing 'modifiers' there is a segmentation fault if the list is empty.
$ alsaucm -c Panda set _verb HiFi list _modifiers Im setting defaults list is empty Segmentation fault (core dumped)
Using 'gdb' I see that the issue is trying to free a not NULL pointer. Program received signal SIGSEGV, Segmentation fault. 0x402a096c in free () from /lib/libc.so.6 (gdb) bt #0 0x402a096c in free () from /lib/libc.so.6 #1 0x40221224 in snd_use_case_free_list () from /usr/lib/libasound.so.2 #2 0x00008d8a in do_one (context=0x13008) at usecase.c:256 #3 do_commands (context=0x13008) at usecase.c:329 #4 0x000091aa in main (argc=<value optimized out>, argv=0xbe9986c4) at usecase.c:440 (gdb) quit
But this can be easily resolved with the correct initialization of the '**list' pointer on the 'do_one' function in 'alsaucm/usecase.c'.
You can find a patch attached to the mail.
Regards,
Alejandro
participants (1)
-
Alejandro Gonzalez