mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	Fix infinite parse of recursive definitions
Fixed the infinite parse (and eventually segfault) of recursive definitions. Also fixed the parse of a string slave PCM of direct plugins.
This commit is contained in:
		
							parent
							
								
									bf174b7046
								
							
						
					
					
						commit
						eccc92a34d
					
				
					 29 changed files with 127 additions and 36 deletions
				
			
		| 
						 | 
				
			
			@ -672,7 +672,10 @@ int snd_pcm_dshare_open(snd_pcm_t **pcmp, const char *name,
 | 
			
		|||
	dshare->sync_ptr = snd_pcm_dshare_sync_ptr;
 | 
			
		||||
 | 
			
		||||
	if (first_instance) {
 | 
			
		||||
		ret = snd_pcm_open_slave(&spcm, root, sconf, stream, mode | SND_PCM_NONBLOCK);
 | 
			
		||||
		/* recursion is already checked in
 | 
			
		||||
		   snd_pcm_direct_get_slave_ipc_offset() */
 | 
			
		||||
		ret = snd_pcm_open_slave(&spcm, root, sconf, stream,
 | 
			
		||||
					 mode | SND_PCM_NONBLOCK, NULL);
 | 
			
		||||
		if (ret < 0) {
 | 
			
		||||
			SNDERR("unable to open slave");
 | 
			
		||||
			goto _err;
 | 
			
		||||
| 
						 | 
				
			
			@ -873,7 +876,7 @@ int _snd_pcm_dshare_open(snd_pcm_t **pcmp, const char *name,
 | 
			
		|||
	params.period_size = psize;
 | 
			
		||||
	params.buffer_size = bsize;
 | 
			
		||||
 | 
			
		||||
	ipc_offset = snd_pcm_direct_get_slave_ipc_offset(sconf, stream);
 | 
			
		||||
	ipc_offset = snd_pcm_direct_get_slave_ipc_offset(root, sconf, stream);
 | 
			
		||||
	if (ipc_offset < 0) {
 | 
			
		||||
		snd_config_delete(sconf);
 | 
			
		||||
		return ipc_offset;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue