aboutsummaryrefslogtreecommitdiffstats
path: root/libSBRdec/src
diff options
context:
space:
mode:
authorFraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de>2019-10-18 14:05:33 +0200
committerJean-Michel Trivi <jmtrivi@google.com>2019-10-18 10:58:52 -0700
commitb2f2a109d3546a1f412fda3a3f41abc6bdb4f949 (patch)
tree11f82af416da38eb21c9ce6874f374e7b6877d2c /libSBRdec/src
parent54cd15bd807a69a7d68cbb414b8a3ea4b280748f (diff)
downloadfdk-aac-b2f2a109d3546a1f412fda3a3f41abc6bdb4f949.tar.gz
fdk-aac-b2f2a109d3546a1f412fda3a3f41abc6bdb4f949.tar.bz2
fdk-aac-b2f2a109d3546a1f412fda3a3f41abc6bdb4f949.zip
Limit too large shift value in apply_inter_tes().
Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I38cc7053e671f6e20a1a9ba4f1645d1cf8be77e2
Diffstat (limited to 'libSBRdec/src')
-rw-r--r--libSBRdec/src/env_calc.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libSBRdec/src/env_calc.cpp b/libSBRdec/src/env_calc.cpp
index 5cfd56c..41c9e88 100644
--- a/libSBRdec/src/env_calc.cpp
+++ b/libSBRdec/src/env_calc.cpp
@@ -739,7 +739,8 @@ static void apply_inter_tes(FIXP_DBL **qmfReal, FIXP_DBL **qmfImag,
fMin(DFRACT_BITS - 1, new_summand_sf - total_power_high_after_sf);
total_power_high_after_sf = new_summand_sf;
} else if (new_summand_sf < total_power_high_after_sf) {
- subsample_power_high[i] >>= total_power_high_after_sf - new_summand_sf;
+ subsample_power_high[i] >>=
+ fMin(DFRACT_BITS - 1, total_power_high_after_sf - new_summand_sf);
}
total_power_high_after += subsample_power_high[i] >> preShift2;
}