mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	Make a copy of the va_list as vsnprintf() is free to change it.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1017 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									0f13c43797
								
							
						
					
					
						commit
						dd0f80e3e2
					
				
					 1 changed files with 7 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -366,8 +366,14 @@ char *pa_vsprintf_malloc(const char *format, va_list ap) {
 | 
			
		|||
    
 | 
			
		||||
    for(;;) {
 | 
			
		||||
        int r;
 | 
			
		||||
        va_list aq;
 | 
			
		||||
 | 
			
		||||
        va_copy(aq, ap);
 | 
			
		||||
 | 
			
		||||
        c = pa_xrealloc(c, size);
 | 
			
		||||
        r = vsnprintf(c, size, format, ap);
 | 
			
		||||
        r = vsnprintf(c, size, format, aq);
 | 
			
		||||
 | 
			
		||||
        va_end(aq);
 | 
			
		||||
        
 | 
			
		||||
        if (r > -1 && r < size)
 | 
			
		||||
            return c;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue