diff options
-rw-r--r-- | libAACenc/src/dyn_bits.cpp | 2 | ||||
-rw-r--r-- | libFDK/src/mdct.cpp | 3 | ||||
-rw-r--r-- | libSBRenc/src/env_est.cpp | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/libAACenc/src/dyn_bits.cpp b/libAACenc/src/dyn_bits.cpp index 0c07109..3105fb4 100644 --- a/libAACenc/src/dyn_bits.cpp +++ b/libAACenc/src/dyn_bits.cpp @@ -416,6 +416,8 @@ static void FDKaacEnc_noiselessCounter( break; } + FDK_ASSERT(sideInfoTab != NULL); + sectionData->noOfSections = 0; sectionData->huffmanBits = 0; sectionData->sideInfoBits = 0; diff --git a/libFDK/src/mdct.cpp b/libFDK/src/mdct.cpp index 9a29aa1..9347a16 100644 --- a/libFDK/src/mdct.cpp +++ b/libFDK/src/mdct.cpp @@ -119,6 +119,9 @@ void imdct_gain(FIXP_DBL *pGain_m, int *pGain_e, int tl) gain_e += -MDCT_OUTPUT_GAIN - log2_tl - MDCT_OUT_HEADROOM + 1; + FDK_ASSERT(log2_tl - 2 >= 0); + FDK_ASSERT(log2_tl - 2 < 8*sizeof(int)); + /* Detect non-radix 2 transform length and add amplitude compensation factor which cannot be included into the exponent above */ switch ( (tl) >> (log2_tl - 2) ) { diff --git a/libSBRenc/src/env_est.cpp b/libSBRenc/src/env_est.cpp index 929f229..7dbf250 100644 --- a/libSBRenc/src/env_est.cpp +++ b/libSBRenc/src/env_est.cpp @@ -1005,6 +1005,7 @@ FDKsbrEnc_extractSbrEnvelope2 ( SBR_STEREO_MODE stereoMode = h_con->stereoMode; int nChannels = h_con->nChannels; + FDK_ASSERT(nChannels < MAX_NUM_CHANNELS); const int *v_tuning; static const int v_tuningHEAAC[6] = { 0, 2, 4, 0, 0, 0 }; |