diff options
author | Fraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de> | 2019-09-20 14:03:40 +0200 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2019-10-15 15:50:10 -0700 |
commit | 2152ae1a5ef0511e0b38a981745eb910f2af9bca (patch) | |
tree | 8b52c5f90cb1e600434cb98198025c7b2afa37b6 /libAACdec/src | |
parent | 3c377e33055267a007566a550820ae1cdb135331 (diff) | |
download | fdk-aac-2152ae1a5ef0511e0b38a981745eb910f2af9bca.tar.gz fdk-aac-2152ae1a5ef0511e0b38a981745eb910f2af9bca.tar.bz2 fdk-aac-2152ae1a5ef0511e0b38a981745eb910f2af9bca.zip |
Suppress integer overflow in lsf_weight_2st() by using 64 bit multiplication with explicit 32 bit integer result.
Bug: 131430997
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: I82ce4858688e90abee0c44c4ada34a9a7b08342f
Diffstat (limited to 'libAACdec/src')
-rw-r--r-- | libAACdec/src/usacdec_lpc.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libAACdec/src/usacdec_lpc.cpp b/libAACdec/src/usacdec_lpc.cpp index d726798..88601b7 100644 --- a/libAACdec/src/usacdec_lpc.cpp +++ b/libAACdec/src/usacdec_lpc.cpp @@ -565,7 +565,8 @@ static void lsf_weight_2st(FIXP_LPC *lsfq, FIXP_DBL *xq, int nk_mode) { /* add non-weighted residual LSF vector to LSF1st */ for (i = 0; i < M_LP_FILTER_ORDER; i++) { w = (LONG)fMultDiv2(factor, sqrtFixp(fMult(d[i], d[i + 1]))); - lsfq[i] = fAddSaturate(lsfq[i], FX_DBL2FX_LPC((FIXP_DBL)(w * (LONG)xq[i]))); + lsfq[i] = fAddSaturate(lsfq[i], + FX_DBL2FX_LPC((FIXP_DBL)((INT64)w * (LONG)xq[i]))); } return; |