Always feed more input data when possible for ADTS

This fixes cases where an ADTS header could set numberOfRawDataBlocks
to a number larger than 1, which would lead to transportDec_FillData
not feeding any more data, even though the input buffer was depleted.

Fixes: 3014/clusterfuzz-testcase-5425740193464320

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
This commit is contained in:
Martin Storsjo 2017-08-15 16:36:05 +03:00
parent 393a86c0db
commit 1244b257ee
1 changed files with 1 additions and 3 deletions

View File

@ -342,9 +342,7 @@ TRANSPORTDEC_ERROR transportDec_FillData(
}
} else {
/* ... else feed bitbuffer with new stream data (append). */
if (hTp->numberOfRawDataBlocks <= 0) {
FDKfeedBuffer (hBs, pBuffer, bufferSize, pBytesValid) ;
}
FDKfeedBuffer (hBs, pBuffer, bufferSize, pBytesValid);
}
return TRANSPORTDEC_OK;