aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de>2020-04-09 17:56:25 +0200
committerRay Essick <essick@google.com>2021-02-14 12:21:44 -0800
commitef5f44c760e01aa86e107a5f304bd477c684c509 (patch)
tree5bb003345e3b67bf0163db90fa34911bb5ced086
parent18758b9fe1a3ea4034792158009996d350f93bb1 (diff)
downloadfdk-aac-ef5f44c760e01aa86e107a5f304bd477c684c509.tar.gz
fdk-aac-ef5f44c760e01aa86e107a5f304bd477c684c509.tar.bz2
fdk-aac-ef5f44c760e01aa86e107a5f304bd477c684c509.zip
Check transportDec_OutOfBandConfig() input buffer size parameter.
Bug: 176246647 Test: atest DecoderTestXheAac DecoderTestAacDrc Change-Id: I60ac86f09a5652c820d60dfdc12212637f888164
-rw-r--r--libAACdec/src/aacdecoder_lib.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libAACdec/src/aacdecoder_lib.cpp b/libAACdec/src/aacdecoder_lib.cpp
index 47e7496..2b5cd8b 100644
--- a/libAACdec/src/aacdecoder_lib.cpp
+++ b/libAACdec/src/aacdecoder_lib.cpp
@@ -1171,8 +1171,10 @@ LINKSPEC_CPP AAC_DECODER_ERROR aacDecoder_DecodeFrame(HANDLE_AACDECODER self,
aacDecoder_FreeMemCallback(self, &asc);
self->streamInfo.numChannels = 0;
/* 3) restore AudioSpecificConfig */
- transportDec_OutOfBandConfig(self->hInput, asc.config,
- (asc.configBits + 7) >> 3, 0);
+ if (asc.configBits <= (TP_USAC_MAX_CONFIG_LEN << 3)) {
+ transportDec_OutOfBandConfig(self->hInput, asc.config,
+ (asc.configBits + 7) >> 3, 0);
+ }
}
}