diff --git a/lib_com/options.h b/lib_com/options.h old mode 100755 new mode 100644 index 7d4b02ad3927662fcc2d05d51d81fa6ea9300272..0f0f0cfb5144de1937599792f6269e529eae71f8 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -186,6 +186,7 @@ #define FIX_MEM_REALLOC_IND_LIST /* VA: issue 601: failure of the automatic memory re-allocation mechanism when ind_list[] buffer is depleted in MASA mode with 2 TC*/ #define FIX_581_CLANG_OFFSET_TO_NULL /* FhG: issue 581: fix CLANG error about applying an offset to a NULL pointer */ #define JBM_PARAMUPMIX /* Dlb: Issue 471: Integrate the Multichannel Parametric Upmix into the JBM path */ +#define FIX_582_INDEX_OUT_OF_BOUNDS_SNS_AVQ_DEC /* FhG: fix an undefined behaviour error in SNS AVQ decoding */ #define FIX_614_ADD_TO_NULL_PTR_DIRAC_SETUP /* FhG: Issue 614: prevent adding to a null pointer in dirac setup code */ /* Fixes for bugs found during split rendering contribution development */ diff --git a/lib_dec/ivas_sns_dec.c b/lib_dec/ivas_sns_dec.c index e11551d2a603439892d7d0589a20ffebe908d8d7..adcfe88186018454da9fe8c88a3117905d8a02f4 100644 --- a/lib_dec/ivas_sns_dec.c +++ b/lib_dec/ivas_sns_dec.c @@ -161,7 +161,11 @@ void sns_avq_dec( { for ( i = 0; i < M; i++ ) { +#ifdef FIX_582_INDEX_OUT_OF_BOUNDS_SNS_AVQ_DEC + SNS_Q[0][i] = SNS_Q[1][i]; +#else SNS_Q[0][i] = SNS_Q[0][M + i]; +#endif } sns_2st_dec( SNS_Q[0], index ); }