diff options
author | Fraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de> | 2018-08-15 14:40:03 +0200 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2018-12-27 12:45:31 -0500 |
commit | 29b81acd78887b24c2995f89c7c34e1861afad69 (patch) | |
tree | 83a3cb04914ebea51ae0cb78f76bfacfeed7d631 /libSBRdec | |
parent | 55930c28afb15d2a05ef5106e887d3e6b998524d (diff) | |
download | fdk-aac-29b81acd78887b24c2995f89c7c34e1861afad69.tar.gz fdk-aac-29b81acd78887b24c2995f89c7c34e1861afad69.tar.bz2 fdk-aac-29b81acd78887b24c2995f89c7c34e1861afad69.zip |
Limit too large shift exponent in apply_inter_tes()
Bug: 112892200
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: I74e349ecb796343b475b825ac7d97497560a1e7a
Diffstat (limited to 'libSBRdec')
-rw-r--r-- | libSBRdec/src/env_calc.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libSBRdec/src/env_calc.cpp b/libSBRdec/src/env_calc.cpp index d7a8bb5..da01bed 100644 --- a/libSBRdec/src/env_calc.cpp +++ b/libSBRdec/src/env_calc.cpp @@ -626,7 +626,8 @@ static void apply_inter_tes(FIXP_DBL **qmfReal, FIXP_DBL **qmfImag, total_power_low >>= diff; total_power_low_sf = new_summand_sf; } else if (new_summand_sf < total_power_low_sf) { - new_summand >>= total_power_low_sf - new_summand_sf; + new_summand >>= + fMin(DFRACT_BITS - 1, total_power_low_sf - new_summand_sf); } total_power_low += (new_summand >> preShift2); @@ -638,7 +639,8 @@ static void apply_inter_tes(FIXP_DBL **qmfReal, FIXP_DBL **qmfImag, fMin(DFRACT_BITS - 1, new_summand_sf - total_power_high_sf); total_power_high_sf = new_summand_sf; } else if (new_summand_sf < total_power_high_sf) { - new_summand >>= total_power_high_sf - new_summand_sf; + new_summand >>= + fMin(DFRACT_BITS - 1, total_power_high_sf - new_summand_sf); } total_power_high += (new_summand >> preShift2); |