diff options
author | Martin Storsjo <martin@martin.st> | 2019-09-06 22:42:07 +0300 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2019-09-06 22:42:07 +0300 |
commit | 5ab5496af95674e9ee741cba178d5b981bccbe45 (patch) | |
tree | d0027fd0163ef8e8ab84f9e8bd9846023d195d9b /libDRCdec | |
parent | cc5c85dd70f04178abccfd2c5539b13e01da78d8 (diff) | |
download | fdk-aac-5ab5496af95674e9ee741cba178d5b981bccbe45.tar.gz fdk-aac-5ab5496af95674e9ee741cba178d5b981bccbe45.tar.bz2 fdk-aac-5ab5496af95674e9ee741cba178d5b981bccbe45.zip |
Avoid index-out-of-bounds in prepareDrcGain
Fixes: 16962/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBFDK_AAC_fuzzer-5708503842291712
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Diffstat (limited to 'libDRCdec')
-rw-r--r-- | libDRCdec/src/drcGainDec_preprocess.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libDRCdec/src/drcGainDec_preprocess.cpp b/libDRCdec/src/drcGainDec_preprocess.cpp index 8bd41d9..514e977 100644 --- a/libDRCdec/src/drcGainDec_preprocess.cpp +++ b/libDRCdec/src/drcGainDec_preprocess.cpp @@ -676,6 +676,7 @@ prepareDrcGain(HANDLE_DRC_GAIN_DECODER hGainDec, nDrcBands = pActiveDrc->bandCountForChannelGroup[g]; for (b = 0; b < nDrcBands; b++) { DRC_ERROR err = DE_OK; + if (gainSetIndex >= 12) return DE_PARAM_OUT_OF_RANGE; GAIN_SET* pGainSet = &(pCoef->gainSet[gainSetIndex]); int seq = pGainSet->gainSequenceIndex[b]; DRC_CHARACTERISTIC* pDChar = &(pGainSet->drcCharacteristic[b]); |