diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-12-27 22:09:51 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-12-27 22:09:51 +0100 |
commit | fdeb98597d4aa2c222df72691ba1cae2a70ceb74 (patch) | |
tree | b1fba9e6139507ade62bc09ed244e0acc8bcdeb7 /libFDK | |
parent | eec17fe051e1b2baac8d5755f2feb9bff2358640 (diff) | |
download | fdk-aac-fdeb98597d4aa2c222df72691ba1cae2a70ceb74.tar.gz fdk-aac-fdeb98597d4aa2c222df72691ba1cae2a70ceb74.tar.bz2 fdk-aac-fdeb98597d4aa2c222df72691ba1cae2a70ceb74.zip |
Add some asserts to FDK
Diffstat (limited to 'libFDK')
-rw-r--r-- | libFDK/src/mdct.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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) ) { |