diff --git a/lib_com/options.h b/lib_com/options.h index 6077b56c658c586d6bd4ee194b0fd4a56d83821d..b58114d2be80da7784f25d4b6bbdda0ce1a94662 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -89,6 +89,7 @@ #define FIX_2252_SCALING_SAVE_HB_SYNTH /* VA: issue 2252: fix use-of-uninit-value in save_hb_synth_fx[] scaling in FOA decoding with bitstream that starts with an SID */ #define FIX_2248_EVS_ASSERT /* VA: Include _sat in an EVS related part of the code */ #define FIX_2254_IMPROV_COMPLEXITY_BE /* VA: BE small complexity reduction */ +#define FIX_2275_OOB_INDEXING_IN_PREDICT_SIGNAL_FUNC /* FhG: fix a USAN OOB error */ #define FIX_2284_ADD_ASSERT_LOG /* FhG: add asserts to Log2_norm_lc() and log10_fx() */ #define FIX_2286_GCC_WARNING_Idx2Freq_Tbl /* FhG: Fix compiler warning for OOB access of Idx2Freq_Tbl[] */ #define FIX_CLANG18_MSAN_IN_DEC_INIT_BY_MOVING_COMMON_INITS_TOGETHER /* FhG: fix CLANG18 MSAN error in decoder init */ diff --git a/lib_com/tcx_ltp_fx.c b/lib_com/tcx_ltp_fx.c index 4eb334205f5230fce05a392f84970bacb68586f5..1ecc8b7665b0ff7cd22727b2624c106c0d156782 100644 --- a/lib_com/tcx_ltp_fx.c +++ b/lib_com/tcx_ltp_fx.c @@ -401,9 +401,20 @@ void predict_signal( x0--; } +#ifdef FIX_2275_OOB_INDEXING_IN_PREDICT_SIGNAL_FUNC + IF( EQ_16( frac_max, 6 ) ) + { + win = &inter6_2tcx2[frac][0]; /* Q15 */ + } + ELSE + { + win = &inter4_2tcx2[frac][0]; /* Q15 */ + } +#else win = &inter4_2tcx2[frac][0]; /* Q15 */ if ( EQ_16( frac_max, 6 ) ) win = &inter6_2tcx2[frac][0]; /* Q15 */ +#endif FOR( j = 0; j < L_subfr; j++ ) {