mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-01 22:58:49 -04:00
ucm: fix seg fault in execute_cset()
When there's no space in 'cset', 'pos' gets NULL, dereferencing 'pos' gets a seg fault. We need to be more robust. Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
78dbc57b99
commit
29880e8c66
1 changed files with 2 additions and 1 deletions
|
|
@ -196,7 +196,8 @@ static int execute_cset(snd_ctl_t *ctl, char *cset)
|
|||
goto __fail;
|
||||
err = 0;
|
||||
__fail:
|
||||
*pos = ' ';
|
||||
if (pos != NULL)
|
||||
*pos = ' ';
|
||||
|
||||
if (id != NULL)
|
||||
free(id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue