mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	pulse-server: improve module argument parsing
ticks also delimit strings. Unescape values. Fixes #1173
This commit is contained in:
		
							parent
							
								
									3ae2b9e189
								
							
						
					
					
						commit
						ab9023f752
					
				
					 1 changed files with 9 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -127,15 +127,19 @@ void module_args_add_props(struct pw_properties *props, const char *str)
 | 
			
		|||
		if (*p == '\"') {
 | 
			
		||||
			p++;
 | 
			
		||||
			f = '\"';
 | 
			
		||||
		} else if (*p == '\'') {
 | 
			
		||||
			p++;
 | 
			
		||||
			f = '\'';
 | 
			
		||||
		} else {
 | 
			
		||||
			f = ' ';
 | 
			
		||||
		}
 | 
			
		||||
		v = p;
 | 
			
		||||
		e = strchr(p, f);
 | 
			
		||||
		if (e == NULL)
 | 
			
		||||
			e = strchr(p, '\0');
 | 
			
		||||
		if (e == NULL)
 | 
			
		||||
			break;
 | 
			
		||||
		for (e = p; *e ; e++) {
 | 
			
		||||
			if (*e == f)
 | 
			
		||||
				break;
 | 
			
		||||
			if (*e == '\\')
 | 
			
		||||
				e++;
 | 
			
		||||
		}
 | 
			
		||||
		p = e;
 | 
			
		||||
		if (*e != '\0')
 | 
			
		||||
			p++;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue