aboutsummaryrefslogtreecommitdiffstats
path: root/libDRCdec/src/drcGainDec_preprocess.cpp
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2019-08-15 13:12:57 +0300
committerMartin Storsjo <martin@martin.st>2019-08-29 22:02:33 +0300
commitcc5c85dd70f04178abccfd2c5539b13e01da78d8 (patch)
treecfd14fffb6decf1d05da6c5beb9c47f7ca95abb4 /libDRCdec/src/drcGainDec_preprocess.cpp
parent9b0f848911068943bbadeb37c0b8857605e74093 (diff)
downloadfdk-aac-cc5c85dd70f04178abccfd2c5539b13e01da78d8.tar.gz
fdk-aac-cc5c85dd70f04178abccfd2c5539b13e01da78d8.tar.bz2
fdk-aac-cc5c85dd70f04178abccfd2c5539b13e01da78d8.zip
Avoid index-out-of-bounds in prepareDrcGain
Fixes: 15998/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBFDK_AAC_fuzzer-5756080707076096 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Diffstat (limited to 'libDRCdec/src/drcGainDec_preprocess.cpp')
-rw-r--r--libDRCdec/src/drcGainDec_preprocess.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libDRCdec/src/drcGainDec_preprocess.cpp b/libDRCdec/src/drcGainDec_preprocess.cpp
index c543c53..8bd41d9 100644
--- a/libDRCdec/src/drcGainDec_preprocess.cpp
+++ b/libDRCdec/src/drcGainDec_preprocess.cpp
@@ -694,6 +694,7 @@ prepareDrcGain(HANDLE_DRC_GAIN_DECODER hGainDec,
err = _prepareDrcCharacteristic(pDChar, pCoef, b, &nodeMod);
if (err) return err;
+ if (seq >= 12) return DE_PARAM_OUT_OF_RANGE;
/* copy a node buffer and convert from dB to linear */
pLnb->nNodes[lnbp] = fMin((int)hUniDrcGain->nNodes[seq], 16);
for (i = 0; i < pLnb->nNodes[lnbp]; i++) {