Commit b98b50d2 authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

fix out-of-bounds access

parent 6893d370
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2010,7 +2010,8 @@ void ivas_dirac_dec_output_synthesis_process_slot_fx(
                {
                    IF( NE_16( temp_q, h_dirac_output_synthesis_state->q_cy_cross_dir_smooth[ch_idx * num_freq_bands + k] ) )
                    {
                        Scale_sig32( &aux_buf[ch_idx * num_freq_bands + k], 1, sub( h_dirac_output_synthesis_state->q_cy_cross_dir_smooth[ch_idx * num_freq_bands + k], temp_q ) );
						aux_buf[k] = 
							L_shl( aux_buf[k], sub( h_dirac_output_synthesis_state->q_cy_cross_dir_smooth[ch_idx * num_freq_bands + k], temp_q ) );
                        /*temp_q->(h_dirac_output_synthesis_state->q_cy_cross_dir_smooth)*/
                    }
                }
@@ -2036,7 +2037,7 @@ void ivas_dirac_dec_output_synthesis_process_slot_fx(
                                  num_freq_bands_diff ); /* h_dirac_output_synthesis_state->diffuse_power_factor_q+15-15*/
                temp_q = h_dirac_output_synthesis_state->diffuse_power_factor_q;
#ifdef FIX_867
                FOR( Word16 k = 0; k < num_freq_bands; k++ )
                FOR( Word16 k = 0; k < num_freq_bands_diff; k++ )
                {
                    IF( NE_16( temp_q, h_dirac_output_synthesis_state->q_cy_auto_diff_smooth[ch_idx * num_freq_bands + k] ) )
                    {
+3 −4
Original line number Diff line number Diff line
@@ -2519,13 +2519,12 @@ void protoSignalComputation_shd_fx(

                    reference_power_fx[l] = L_add( reference_power_fx[l], L_shr( reference_power_fx[idx1], 1 ) ); /*2*Q(q_cldfb+min_q_shift)-31-1*/
                    move32();
#ifdef FIX_867
					reference_power_q[l] = sub(add(*proto_direct_buffer_f_q, *proto_direct_buffer_f_q), 31);
#endif
                }

                *proto_direct_buffer_f_q = add( q_cldfb, min_q_shift );
#ifndef FIX_867
#ifdef FIX_867
				reference_power_q[l] = sub(add(*proto_direct_buffer_f_q, *proto_direct_buffer_f_q), 31);
#else
                *reference_power_q = sub( add( *proto_direct_buffer_f_q, *proto_direct_buffer_f_q ), 31 );
#endif