Adjust eqSubbandGainFormat data type to prevent load of invalid value in _skipEqCoefficients().

Bug: 186777497
Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc
Change-Id: Ibd70f0c3e591d5581e5fe2a7469181bc0ba95a3c
This commit is contained in:
Fraunhofer IIS FDK 2020-04-17 15:11:43 +02:00 committed by Jean-Michel Trivi
parent 48e0fa028d
commit f724d3361f
1 changed files with 2 additions and 2 deletions

View File

@ -917,7 +917,7 @@ static void _skipEqCoefficients(HANDLE_FDK_BITSTREAM hBs) {
firFilterOrder;
int uniqueEqSubbandGainsCount, eqSubbandGainRepresentation,
eqSubbandGainCount;
EQ_SUBBAND_GAIN_FORMAT eqSubbandGainFormat;
int eqSubbandGainFormat;
eqDelayMaxPresent = FDKreadBits(hBs, 1);
if (eqDelayMaxPresent) {
@ -958,7 +958,7 @@ static void _skipEqCoefficients(HANDLE_FDK_BITSTREAM hBs) {
uniqueEqSubbandGainsCount = FDKreadBits(hBs, 6);
if (uniqueEqSubbandGainsCount > 0) {
eqSubbandGainRepresentation = FDKreadBits(hBs, 1);
eqSubbandGainFormat = (EQ_SUBBAND_GAIN_FORMAT)FDKreadBits(hBs, 4);
eqSubbandGainFormat = FDKreadBits(hBs, 4);
switch (eqSubbandGainFormat) {
case GF_QMF32:
eqSubbandGainCount = 32;