diff --git a/lib_com/options.h b/lib_com/options.h index 9de0874dbbe35d2eb19e0e7c99157904c3058bcf..dd13856281724cadd9cb2c40b91a508ba37a24f0 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -154,6 +154,7 @@ #define FIX_814_DOUBLE_PREC_IN_REVERB /* Philips: Issue 814: Replace double precision arithmetic in reverb */ #define FIX_866_MOVE_VBAP /* Nokia: Issue 866: Move VBAP to lib_rend */ #define FIX_863_REMOVE_REDUNDANCIES_OMASA /* Nokia/VA: Issue 863: Remove redundancies in stereo_classifier for OMASA */ +#define FIX_879_USAN_ERROR_IN_MASA_DECODING /* FhG: Issue 879 : avoid arithmetic with NULL pointer in the DirAC decoder to fix USAN error */ /* #################### End BE switches ################################## */ diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 876ae9130d7487f9848250ade82856f36c68a574..815422a18278aad4aa2f44aeceddf8d2a52363ab 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -1812,7 +1812,11 @@ void ivas_dirac_dec_render_sf( DirAC_mem = hDirACRend->stack_mem; reference_power = DirAC_mem.reference_power; +#ifdef FIX_879_USAN_ERROR_IN_MASA_DECODING + reference_power_smooth = ( DirAC_mem.reference_power == NULL ) ? NULL : DirAC_mem.reference_power + hSpatParamRendCom->num_freq_bands; +#else reference_power_smooth = DirAC_mem.reference_power + hSpatParamRendCom->num_freq_bands; +#endif onset_filter = DirAC_mem.onset_filter; onset_filter_subframe = ( DirAC_mem.onset_filter == NULL ) ? NULL : DirAC_mem.onset_filter + hSpatParamRendCom->num_freq_bands; diff --git a/scripts/ubsan.supp b/scripts/ubsan.supp index f33ddee9d4e3ecdf5f6fa6dbe10dd074e4f2d8f6..fc3f22e328b802ceb69a3447e5591957963195f5 100644 --- a/scripts/ubsan.supp +++ b/scripts/ubsan.supp @@ -34,7 +34,6 @@ implicit-signed-integer-truncation:pvq_core_dec.c implicit-signed-integer-truncation:pvq_core_enc.c implicit-signed-integer-truncation:tcq_position_arith.c implicit-signed-integer-truncation:tools.c -pointer-overflow:ivas_dirac_dec.c shift-base:basop32.c shift-base:enh40.c shift-base:enh40.h