From 865d7f6e524bdba36656648adee54faa654529ff Mon Sep 17 00:00:00 2001 From: knj Date: Wed, 19 Jul 2023 10:42:25 +0200 Subject: [PATCH] add fix for usan error in dirac setup --- lib_com/options.h | 1 + lib_dec/ivas_dirac_dec.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index c7204c05fa..21e81f33ad 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -176,6 +176,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 */ /* ################## End BE DEVELOPMENT switches ######################### */ diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index f3ea6912f3..03443a2196 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -2374,7 +2374,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 ); -- GitLab