mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	sample-util: avoid stack overrun
The linear volume array needs enough padding when preparing the volumes for mixing.
This commit is contained in:
		
							parent
							
								
									509d9f04e5
								
							
						
					
					
						commit
						9d25467964
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -137,7 +137,7 @@ static void calc_linear_float_volume(float linear[], const pa_cvolume *volume) {
 | 
			
		|||
 | 
			
		||||
static void calc_linear_integer_stream_volumes(pa_mix_info streams[], unsigned nstreams, const pa_cvolume *volume, const pa_sample_spec *spec) {
 | 
			
		||||
    unsigned k, channel;
 | 
			
		||||
    float linear[PA_CHANNELS_MAX];
 | 
			
		||||
    float linear[PA_CHANNELS_MAX + VOLUME_PADDING];
 | 
			
		||||
 | 
			
		||||
    pa_assert(streams);
 | 
			
		||||
    pa_assert(spec);
 | 
			
		||||
| 
						 | 
				
			
			@ -156,7 +156,7 @@ static void calc_linear_integer_stream_volumes(pa_mix_info streams[], unsigned n
 | 
			
		|||
 | 
			
		||||
static void calc_linear_float_stream_volumes(pa_mix_info streams[], unsigned nstreams, const pa_cvolume *volume, const pa_sample_spec *spec) {
 | 
			
		||||
    unsigned k, channel;
 | 
			
		||||
    float linear[PA_CHANNELS_MAX];
 | 
			
		||||
    float linear[PA_CHANNELS_MAX + VOLUME_PADDING];
 | 
			
		||||
 | 
			
		||||
    pa_assert(streams);
 | 
			
		||||
    pa_assert(spec);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue