diff --git a/lib_com/ivas_spar_com.c b/lib_com/ivas_spar_com.c index 03721833b90e45c845e423f745aa6434643b42a8..d597d133fdb1338edae6d76e1181f0e22c3396f0 100644 --- a/lib_com/ivas_spar_com.c +++ b/lib_com/ivas_spar_com.c @@ -1766,7 +1766,11 @@ void ivas_get_spar_md_from_dirac( { for ( band = start_band; band < end_band; band++ ) { +#ifdef FIX_615_UBSAN_SPAR_TO_DIRAC + ndm = hSpar_md_cfg->num_dmx_chans_per_band[band]; +#else ndm = hSpar_md_cfg->num_dmx_chans_per_band[band - 1]; +#endif /*SPAR from DirAC*/ set_f( response_avg, 0.0f, MAX_OUTPUT_CHANNELS ); diff --git a/lib_com/options.h b/lib_com/options.h index 41cea169a1264265dcba2859cb461278e91148e7..35f28ad31f2ae5face966776bd04c543cc750eca 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -203,6 +203,7 @@ #define FIX_619_ADD_UNDEF_VAL_FOR_CONCEALMENT_MODE /* FhG: fix usan error */ #define FIX_622_SILENCE_USAN_WARNING /* FhG: silenceusan warning in ifft code */ +#define FIX_615_UBSAN_SPAR_TO_DIRAC /*Dlb : Fix for UBSAN issue 615*/ /* ################## End BE DEVELOPMENT switches ######################### */