summaryrefslogtreecommitdiff
path: root/libAACdec
diff options
context:
space:
mode:
authorFraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de>2020-04-09 17:56:25 +0200
committerJean-Michel Trivi <jmtrivi@google.com>2020-12-28 09:21:16 -0800
commitb1136d1c348261adc1801c8db04d25033a0bdb9f (patch)
treee2927f84c1a8df3f094c6d10ecc41a3af23d2a5f /libAACdec
parentfcc3c65ec545ebaf4cbb78d529b47e6d6b5d4ce9 (diff)
downloadaac-b1136d1c348261adc1801c8db04d25033a0bdb9f.tar.gz
Check transportDec_OutOfBandConfig() input buffer size parameter.
Bug: 176246647 Test: atest DecoderTestXheAac DecoderTestAacDrc Change-Id: I60ac86f09a5652c820d60dfdc12212637f888164
Diffstat (limited to 'libAACdec')
-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 4c0d347..0c13304 100644
--- a/libAACdec/src/aacdecoder_lib.cpp
+++ b/libAACdec/src/aacdecoder_lib.cpp
@@ -1179,8 +1179,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);
+ }
}
}