diff options
author | Fraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de> | 2019-10-18 14:04:32 +0200 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2019-10-18 10:58:14 -0700 |
commit | b8f7bab39cf4b3c97bbca9c3461e7c047a20d4ab (patch) | |
tree | 546225c54e4542a18069d5c641d251504d5ba48a | |
parent | 920ecc7487645192e9b9dee7c5261b5ff8b81be9 (diff) | |
download | fdk-aac-b8f7bab39cf4b3c97bbca9c3461e7c047a20d4ab.tar.gz fdk-aac-b8f7bab39cf4b3c97bbca9c3461e7c047a20d4ab.tar.bz2 fdk-aac-b8f7bab39cf4b3c97bbca9c3461e7c047a20d4ab.zip |
Fix integer overflow in imlt_block().
Bug: 131430997
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: Ia7e03bbf6daef61079514de407a5900f6dc22a21
-rw-r--r-- | libFDK/src/mdct.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libFDK/src/mdct.cpp b/libFDK/src/mdct.cpp index d697cfb..0062b27 100644 --- a/libFDK/src/mdct.cpp +++ b/libFDK/src/mdct.cpp @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2018 Fraunhofer-Gesellschaft zur Förderung der angewandten +© Copyright 1995 - 2019 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION @@ -569,7 +569,7 @@ INT imlt_block(H_MDCT hMdct, FIXP_DBL *output, FIXP_DBL *spectrum, */ for (i = 0; i < hMdct->prev_nr; i++) { FIXP_DBL x = -(*pOvl--); - *pOut0 = IMDCT_SCALE_DBL(x + hMdct->pFacZir[i]); + *pOut0 = fAddSaturate(x, IMDCT_SCALE_DBL(hMdct->pFacZir[i])); pOut0++; } hMdct->pFacZir = NULL; @@ -678,7 +678,7 @@ INT imlt_block(H_MDCT hMdct, FIXP_DBL *output, FIXP_DBL *spectrum, FIXP_DBL *pOut = pOut0 - fl / 2; FDK_ASSERT(fl / 2 <= 128); for (i = 0; i < fl / 2; i++) { - pOut[i] += IMDCT_SCALE_DBL(hMdct->pFacZir[i]); + pOut[i] = fAddSaturate(pOut[i], IMDCT_SCALE_DBL(hMdct->pFacZir[i])); } hMdct->pFacZir = NULL; } |