diff --git a/lib_com/options.h b/lib_com/options.h index 4cc2a3860b150c76f32e6570acb6136a8f1a9cd3..8a9848e4d2ef7f1b1e25934c1916a76c8bc1e117 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -111,6 +111,7 @@ #define NONBE_FIX_1075 /* FhG: fix segfault for bitrate switching + BINAURAL_ROOM_REVERB output in MC */ #define NON_BE_FIX_1041_USE_OLD_CNG_LSPS_IF_NONSTAB /* FhG: fix bug in TD MDCT-Stereo concealment */ #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 */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/ivas_dirac_dec_fx.c b/lib_dec/ivas_dirac_dec_fx.c index 915257562567b739cf297a814e5b5019c601dd92..1713ec0bd19d391f3d20eca5018cad134da4fde0 100644 --- a/lib_dec/ivas_dirac_dec_fx.c +++ b/lib_dec/ivas_dirac_dec_fx.c @@ -3777,10 +3777,18 @@ void ivas_dirac_dec_render_sf_fx( g_fx = Madd_32_16( Mpy_32_16_1( gain_fx, *w1_fx ), prev_gain_fx, w2_fx ); // Q15 FOR( l = 0; l < hSpatParamRendCom->num_freq_bands; l++ ) { +#ifdef FIX_1060_USAN_ARRAY_BOUNDS + Cldfb_RealBuffer_fx[j2][k][l] = Madd_32_32( Cldfb_RealBuffer_fx[j2][k][l], g_fx, *tc_re_fx ); +#else Cldfb_RealBuffer_fx[j2][0][k * hSpatParamRendCom->num_freq_bands + l] = Madd_32_32( Cldfb_RealBuffer_fx[j2][0][k * hSpatParamRendCom->num_freq_bands + l], g_fx, *tc_re_fx ); +#endif move32(); tc_re_fx++; +#ifdef FIX_1060_USAN_ARRAY_BOUNDS + Cldfb_ImagBuffer_fx[j2][k][l] = Madd_32_32( Cldfb_ImagBuffer_fx[j2][k][l], g_fx, *tc_im_fx ); +#else Cldfb_ImagBuffer_fx[j2][0][k * hSpatParamRendCom->num_freq_bands + l] = Madd_32_32( Cldfb_ImagBuffer_fx[j2][0][k * hSpatParamRendCom->num_freq_bands + l], g_fx, *tc_im_fx ); +#endif move32(); tc_re_fx++; }