Commit f59a7789 authored by Vladimir Malenovsky's avatar Vladimir Malenovsky
Browse files

decrement the last index of the for loop to avoid ASAN error

parent f221482e
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -205,6 +205,7 @@
#define FIX_468_16KHZ_PUPMIX                            /* Dlb: Fix issue 468 for Param Upmix at 16kHz sampling rate */

#define FIX_485_STATIC_BUFFERS                          /* FhG: move static buffers in DirAC parameter estimator to the DirAC struct */
#define FIX_I503_ASAN_ERROR_IND_LIST                    /* VA: fix issue #503: address sanitizer error with IND_LIST_DYN */

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
+4 −0
Original line number Diff line number Diff line
@@ -2222,7 +2222,11 @@ void restore_metadata_buffer(
    int16_t i;

#ifdef IND_LIST_DYN
#ifdef FIX_I503_ASAN_ERROR_IND_LIST
    for ( i = next_ind_start; i < hMetaData->nb_ind_tot; i++ )
#else
    for ( i = next_ind_start; i <= hMetaData->nb_ind_tot; i++ )
#endif
#else
    for ( i = next_ind_start; i <= hMetaData->next_ind; i++ )
#endif