aboutsummaryrefslogtreecommitdiffstats
path: root/libDRCdec/src
diff options
context:
space:
mode:
authorFraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de>2020-04-17 15:11:43 +0200
committerJean-Michel Trivi <jmtrivi@google.com>2021-05-07 15:24:59 -0700
commitf724d3361fc367db0fe82a06a4d43f2eba0f95d6 (patch)
treed371b54c3ba332ed0e0c82e07abd331231065def /libDRCdec/src
parent48e0fa028d4c6f70f46ef5608b2108c89453a487 (diff)
downloadfdk-aac-f724d3361fc367db0fe82a06a4d43f2eba0f95d6.tar.gz
fdk-aac-f724d3361fc367db0fe82a06a4d43f2eba0f95d6.tar.bz2
fdk-aac-f724d3361fc367db0fe82a06a4d43f2eba0f95d6.zip
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
Diffstat (limited to 'libDRCdec/src')
-rw-r--r--libDRCdec/src/drcDec_reader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libDRCdec/src/drcDec_reader.cpp b/libDRCdec/src/drcDec_reader.cpp
index b3ec187..b080f50 100644
--- a/libDRCdec/src/drcDec_reader.cpp
+++ b/libDRCdec/src/drcDec_reader.cpp
@@ -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;