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

Merge branch '626-ubsan-assignments-between-unsigned-and-signed-int-change-values-in' into 'main'

Resolve "UBSAN: assignments between unsigned and signed int change values in TonalMDCTConceal_SaveFreqSignal"

See merge request !851
parents d9e1e8e9 bd0cec97
Loading
Loading
Loading
Loading
Loading

lib_com/options.h

100644 → 100755
+1 −0
Original line number Diff line number Diff line
@@ -189,6 +189,7 @@
#define FIX_622_SILENCE_USAN_WARNING                    /* FhG: silenceusan warning in ifft code */

#define FIX_615_UBSAN_SPAR_TO_DIRAC                     /*Dlb : Fix for UBSAN issue 615*/
#define FIX_626_VARIABLE_TYPE_MDCT_CONC                 /* FhG: trivial fix to fix USAN error */
#define FIX_616_DIV_ZERO_MCT                            /*FhG : Fix UBSAN division by zero error of issue 616*/

/* ################## End BE DEVELOPMENT switches ######################### */
+4 −0
Original line number Diff line number Diff line
@@ -126,7 +126,11 @@ void TonalMDCTConceal_SaveFreqSignal(
    const int16_t infoIGFStartLine )
{
    float *temp;
#ifdef FIX_626_VARIABLE_TYPE_MDCT_CONC
    uint16_t nOldSamples;
#else
    int16_t nOldSamples;
#endif

    assert( nNewSamples > 0 && nNewSamples <= 2 * L_FRAME_MAX );