1
0
mirror of https://github.com/mstorsjo/fdk-aac.git synced 2025-06-05 22:39:13 +02:00

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
This commit is contained in:
Martin Storsjo
2019-08-15 13:12:57 +03:00
parent 9b0f848911
commit cc5c85dd70

View File

@@ -694,6 +694,7 @@ prepareDrcGain(HANDLE_DRC_GAIN_DECODER hGainDec,
err = _prepareDrcCharacteristic(pDChar, pCoef, b, &nodeMod); err = _prepareDrcCharacteristic(pDChar, pCoef, b, &nodeMod);
if (err) return err; if (err) return err;
if (seq >= 12) return DE_PARAM_OUT_OF_RANGE;
/* copy a node buffer and convert from dB to linear */ /* copy a node buffer and convert from dB to linear */
pLnb->nNodes[lnbp] = fMin((int)hUniDrcGain->nNodes[seq], 16); pLnb->nNodes[lnbp] = fMin((int)hUniDrcGain->nNodes[seq], 16);
for (i = 0; i < pLnb->nNodes[lnbp]; i++) { for (i = 0; i < pLnb->nNodes[lnbp]; i++) {