diff options
author | Fraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de> | 2020-04-09 17:54:10 +0200 |
---|---|---|
committer | Ray Essick <essick@google.com> | 2021-02-14 12:20:56 -0800 |
commit | e916be37f24a118eb0663b53794389dc83af8e8d (patch) | |
tree | b4bc2ab1793d2caf256a01ad199b6c52d01e6c67 /libSACdec/src/sac_stp.cpp | |
parent | ba54a5c0401141cea1a4570590432ff922ccf643 (diff) | |
download | fdk-aac-e916be37f24a118eb0663b53794389dc83af8e8d.tar.gz fdk-aac-e916be37f24a118eb0663b53794389dc83af8e8d.tar.bz2 fdk-aac-e916be37f24a118eb0663b53794389dc83af8e8d.zip |
Prevent integer overflow in subbandTPApply() energy update.
Bug: 176246647
Test: atest DecoderTestXheAac DecoderTestAacDrc
Change-Id: I9ed8b33414907706808956cffad252052928c799
Diffstat (limited to 'libSACdec/src/sac_stp.cpp')
-rw-r--r-- | libSACdec/src/sac_stp.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libSACdec/src/sac_stp.cpp b/libSACdec/src/sac_stp.cpp index bb66277..b328c82 100644 --- a/libSACdec/src/sac_stp.cpp +++ b/libSACdec/src/sac_stp.cpp @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2019 Fraunhofer-Gesellschaft zur Förderung der angewandten +© Copyright 1995 - 2020 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION @@ -369,15 +369,15 @@ SACDEC_ERROR subbandTPApply(spatialDec *self, const SPATIAL_BS_FRAME *frame) { hStpDec->update_old_ener = 1; for (ch = 0; ch < self->numInputChannels; ch++) { hStpDec->oldDryEnerLD64[ch] = - CalcLdData(hStpDec->runDryEner[ch] + ABS_THR__FDK); + CalcLdData(fAddSaturate(hStpDec->runDryEner[ch], ABS_THR__FDK)); } for (ch = 0; ch < self->numOutputChannels; ch++) { if (self->treeConfig == TREE_212) hStpDec->oldWetEnerLD64[ch] = - CalcLdData(hStpDec->runWetEner[ch] + ABS_THR__FDK); + CalcLdData(fAddSaturate(hStpDec->runWetEner[ch], ABS_THR__FDK)); else hStpDec->oldWetEnerLD64[ch] = - CalcLdData(hStpDec->runWetEner[ch] + ABS_THR2__FDK); + CalcLdData(fAddSaturate(hStpDec->runWetEner[ch], ABS_THR2__FDK)); } } else { hStpDec->update_old_ener++; |