aboutsummaryrefslogtreecommitdiffstats
path: root/libSBRdec/src/env_calc.cpp
diff options
context:
space:
mode:
authorFraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de>2019-10-29 13:05:40 +0100
committerJean-Michel Trivi <jmtrivi@google.com>2019-12-27 08:58:46 -0800
commit2ce3e76d0fd843e1cede9c747392b716039db596 (patch)
tree8910724becd6dd52c04d6d55136ac7b8b3a90953 /libSBRdec/src/env_calc.cpp
parent5838a313ae49b81dfc377d4c4ef45c34239d3495 (diff)
downloadfdk-aac-2ce3e76d0fd843e1cede9c747392b716039db596.tar.gz
fdk-aac-2ce3e76d0fd843e1cede9c747392b716039db596.tar.bz2
fdk-aac-2ce3e76d0fd843e1cede9c747392b716039db596.zip
Improve robustness of limiter band table calculation in ResetLimiterBands().
Bug: 145668973 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: Ic076cf5b44c0618734064b670de61f9da532a13e
Diffstat (limited to 'libSBRdec/src/env_calc.cpp')
-rw-r--r--libSBRdec/src/env_calc.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libSBRdec/src/env_calc.cpp b/libSBRdec/src/env_calc.cpp
index 41c9e88..23ad509 100644
--- a/libSBRdec/src/env_calc.cpp
+++ b/libSBRdec/src/env_calc.cpp
@@ -3144,6 +3144,11 @@ ResetLimiterBands(
return SBRDEC_UNSUPPORTED_CONFIG;
}
+ /* Restrict maximum value of limiter band table */
+ if (workLimiterBandTable[tempNoLim] > highSubband) {
+ return SBRDEC_UNSUPPORTED_CONFIG;
+ }
+
/* Copy limiterbands from working buffer into final destination */
for (k = 0; k <= nBands; k++) {
limiterBandTable[k] = workLimiterBandTable[k];