mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	UCM: snd_use_case_get: Don't segfault when no current verb
get_value, called by snd_use_case_get, uses uc_mgr->active_verb without checking there is one, and hence can segfault. Fix this. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
		
							parent
							
								
									32d24f4071
								
							
						
					
					
						commit
						a48f67c0ed
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
					@ -1180,6 +1180,9 @@ static int get_value(snd_use_case_mgr_t *uc_mgr,
 | 
				
			||||||
	struct use_case_device *dev;
 | 
						struct use_case_device *dev;
 | 
				
			||||||
	int err;
 | 
						int err;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!uc_mgr->active_verb)
 | 
				
			||||||
 | 
							return -ENOENT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (item != NULL) {
 | 
						if (item != NULL) {
 | 
				
			||||||
		mod = find_modifier(uc_mgr, uc_mgr->active_verb, item, 0);
 | 
							mod = find_modifier(uc_mgr, uc_mgr->active_verb, item, 0);
 | 
				
			||||||
		if (mod != NULL) {
 | 
							if (mod != NULL) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue