From b2f2a109d3546a1f412fda3a3f41abc6bdb4f949 Mon Sep 17 00:00:00 2001 From: Fraunhofer IIS FDK Date: Fri, 18 Oct 2019 14:05:33 +0200 Subject: Limit too large shift value in apply_inter_tes(). Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I38cc7053e671f6e20a1a9ba4f1645d1cf8be77e2 --- libSBRdec/src/env_calc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libSBRdec') 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; } -- cgit v1.2.3