Commit 49731e9b authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch '614-ubsan-applying-non-zero-offset-240-to-null-pointer-in-ivas_dirac_dec' into 'main'

Resolve "UBSAN: applying non-zero offset 240 to null pointer in ivas_dirac_dec"

See merge request !840
parents 833f0b5c d0e0c2ee
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -186,6 +186,7 @@
#define FIX_MEM_REALLOC_IND_LIST                        /* VA: issue 601: failure of the automatic memory re-allocation mechanism when ind_list[] buffer is depleted in MASA mode with 2 TC*/
#define FIX_581_CLANG_OFFSET_TO_NULL                    /* FhG: issue 581: fix CLANG error about applying an offset to a NULL pointer */
#define JBM_PARAMUPMIX                                  /* Dlb: Issue 471: Integrate the Multichannel Parametric Upmix into the JBM path */
#define FIX_614_ADD_TO_NULL_PTR_DIRAC_SETUP             /* FhG: Issue 614: prevent adding to a null pointer in dirac setup code */

/* Fixes for bugs found during split rendering contribution development */
#define REND_STATIC_MEM_OPT                             /* Dlb: Static memory optimisation for external renderer */
+4 −0
Original line number Diff line number Diff line
@@ -2383,7 +2383,11 @@ void ivas_dirac_dec_render_sf(
    reference_power = DirAC_mem.reference_power;
    reference_power_smooth = DirAC_mem.reference_power + hDirAC->num_freq_bands;
    onset_filter = DirAC_mem.onset_filter;
#ifdef FIX_614_ADD_TO_NULL_PTR_DIRAC_SETUP
    onset_filter_subframe = ( DirAC_mem.onset_filter == NULL ) ? NULL : DirAC_mem.onset_filter + hDirAC->num_freq_bands;
#else
    onset_filter_subframe = DirAC_mem.onset_filter + hDirAC->num_freq_bands;
#endif

    hodirac_flag = ivas_get_hodirac_flag( st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->sba_analysis_order );