From 2ce3e76d0fd843e1cede9c747392b716039db596 Mon Sep 17 00:00:00 2001 From: Fraunhofer IIS FDK Date: Tue, 29 Oct 2019 13:05:40 +0100 Subject: Improve robustness of limiter band table calculation in ResetLimiterBands(). Bug: 145668973 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: Ic076cf5b44c0618734064b670de61f9da532a13e --- libSBRdec/src/env_calc.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libSBRdec') 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]; -- cgit v1.2.3