mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05: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,6 +196,7 @@ static int execute_cset(snd_ctl_t *ctl, char *cset)
 | 
				
			||||||
		goto __fail;
 | 
							goto __fail;
 | 
				
			||||||
	err = 0;
 | 
						err = 0;
 | 
				
			||||||
      __fail:
 | 
					      __fail:
 | 
				
			||||||
 | 
						if (pos != NULL)
 | 
				
			||||||
		*pos = ' ';
 | 
							*pos = ' ';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (id != NULL)
 | 
						if (id != NULL)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue