Commit dde28a03 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch '582-ubsan-index-out-of-bounds-in-sns-avq-decoder' into 'main'

Resolve "UBSAN: Index out-of-bounds in SNS AVQ decoder"

See merge request !838
parents 49731e9b 80e245ad
Loading
Loading
Loading
Loading
Loading

lib_com/options.h

100755 → 100644
+1 −0
Original line number Diff line number Diff line
@@ -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 */
+4 −0
Original line number Diff line number Diff line
@@ -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 );
        }