Commit 9b8da097 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch...

Merge branch '632-ubsan-offset-to-null-pointer-proto_diffuse_buffer_f-in-dirac-rendering' into 'main'

Resolve "UBSAN: offset to null pointer proto_diffuse_buffer_f in dirac rendering"

See merge request !998
parents afb0f721 24ddae52
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -164,6 +164,7 @@
#define FIX_RAM_COUNTING_5MS_RENDERING                  /* FhG: fix for correct RAM reporting with 5ms rendering */
#define FIX_786_ERROR_ISM_METADATA_READ                 /* VA: fix error reading past the last line of .csv metadata files */

#define FIX_632_USAN_ERROR_NULL_POINTER                /* FhG: issue 632 USAN offset to null pointer proto_diffuse_buffer_f in dirac rendering*/
/* #################### End BE switches ################################## */

/* #################### Start NON-BE switches ############################ */
+6 −1
Original line number Diff line number Diff line
@@ -1522,7 +1522,12 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls(
        }

        /*Diffuse stream*/
#ifdef FIX_632_USAN_ERROR_NULL_POINTER
        if ( h_dirac_output_synthesis_params->max_band_decorr != 0 )
#endif
        {
            p_power_smooth_diff = h_dirac_output_synthesis_state->proto_diffuse_buffer_f + buf_idx * 2 * h_dirac_output_synthesis_params->max_band_decorr * nchan_out_woLFE;
        }
        p_gain_1 = gains_diff;
        p_gain_2 = h_dirac_output_synthesis_state->gains_diff_prev;
        for ( k = 0; k < nchan_out_woLFE; k++ )
+6 −0
Original line number Diff line number Diff line
@@ -1641,6 +1641,12 @@ void ivas_dirac_dec_compute_diffuse_proto(
    h_dirac_output_synthesis_state = &( hDirACRend->h_output_synthesis_psd_state );

    num_freq_bands_diff = h_dirac_output_synthesis_params->max_band_decorr;
#ifdef FIX_632_USAN_ERROR_NULL_POINTER
    if ( num_freq_bands_diff == 0 )
    {
        return;
    }
#endif

    p_diff_buffer = h_dirac_output_synthesis_state->proto_diffuse_buffer_f + slot_idx * 2 * num_freq_bands_diff * hDirACRend->hOutSetup.nchan_out_woLFE;
    p_diff_buffer_1 = p_diff_buffer + 1;
+0 −2
Original line number Diff line number Diff line
@@ -38,8 +38,6 @@ implicit-signed-integer-truncation:tcq_position_arith.c
implicit-signed-integer-truncation:tools.c
null:ivas_dirac_com.c
pointer-overflow:ivas_dirac_dec.c
pointer-overflow:ivas_dirac_output_synthesis_dec.c
pointer-overflow:ivas_dirac_rend.c
shift-base:basop32.c
shift-base:enh40.c
shift-base:enh40.h