Improve robustness of limiter band table calculation in ResetLimiterBands().

Bug: 145668973
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: Ic076cf5b44c0618734064b670de61f9da532a13e
This commit is contained in:
Fraunhofer IIS FDK 2019-10-29 13:05:40 +01:00 committed by Jean-Michel Trivi
parent 5838a313ae
commit 2ce3e76d0f
1 changed files with 5 additions and 0 deletions

View File

@ -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];