Avoid index-out-of-bounds in processDrcTime

Fixes: 17638/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBFDK_AAC_fuzzer-5699860921057280

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
This commit is contained in:
Martin Storsjo 2019-10-02 13:32:57 +03:00
parent 5ab5496af9
commit 3b9dd6b614
1 changed files with 2 additions and 0 deletions

View File

@ -308,6 +308,8 @@ processDrcTime(HANDLE_DRC_GAIN_DECODER hGainDec, const int activeDrcIndex,
pLinearNodeBuffer[pActiveDrc->lnbIndexForChannel[c][lnbIx] + b]);
else
pLnbPrevious = pDummyLnb;
if (pLnbPrevious->nNodes[lnbIx] <= 0 || pLnbPrevious->nNodes[lnbIx] > 16)
return DE_NOT_OK;
nodePrevious =
pLnbPrevious->linearNode[lnbIx][pLnbPrevious->nNodes[lnbIx] - 1];
nodePrevious.time -= hGainDec->frameSize;