diff --git a/lib_com/options.h b/lib_com/options.h index 5488015ca76d6fc8993b29273484f0782d36f808..e31f292aa4d379acef476de32ba62149c33ab540 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -193,6 +193,7 @@ #define NON_BE_FIX_1041_USE_OLD_CNG_LSPS_IF_NONSTAB /* FhG: fix bug in TD MDCT-Stereo concealment */ #define FIX_1044_ISM_REND_MEMORY /* VA: issue 1044: Lower the memory of the ISM renderer handle. */ #define NONBE_FIX_1063_DIV_BY_ZERO_SUMNRG /* VoiceAge: issue 1063: division by zero for angle_rot feature in the UNCLR classifier */ +#define FIX_1060_USAN_ARRAY_BOUNDS /* FhG: issue 1060: USAN array-bounds errors */ #define NONBE_FIX_984_OMASA_EXT_OUTPUT /* Nok: issue 1497 - porting OMASA EXT MR */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 49c6736aa86f191b974e479bbb92a5bd78cd3737..cc0a8e97181b002f80fd206b028f1c01ed9d0782 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -2286,8 +2286,14 @@ void ivas_dirac_dec_render_sf( for ( l = 0; l < hSpatParamRendCom->num_freq_bands; l++ ) { +#ifdef FIX_1060_USAN_ARRAY_BOUNDS + Cldfb_RealBuffer[j2][k][l] += g * *( tc_re++ ); + Cldfb_ImagBuffer[j2][k][l] += g * *( tc_im++ ); +#else + Cldfb_RealBuffer[j2][0][k * hSpatParamRendCom->num_freq_bands + l] += g * *( tc_re++ ); Cldfb_ImagBuffer[j2][0][k * hSpatParamRendCom->num_freq_bands + l] += g * *( tc_im++ ); +#endif } w1 += hSpatParamRendCom->num_freq_bands; }