mirror of https://github.com/mstorsjo/fdk-aac.git
Feed more input data when necessary 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:
parent
b257494414
commit
5e053a4005
|
@ -665,7 +665,7 @@ TRANSPORTDEC_ERROR transportDec_FillData(const HANDLE_TRANSPORTDEC hTp,
|
||||||
return TRANSPORTDEC_OK;
|
return TRANSPORTDEC_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hTp->numberOfRawDataBlocks <= 0) {
|
if (hTp->numberOfRawDataBlocks <= 0 || FDKgetValidBits(hBs) == 0) {
|
||||||
FDKfeedBuffer(hBs, pBuffer, bufferSize, pBytesValid);
|
FDKfeedBuffer(hBs, pBuffer, bufferSize, pBytesValid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue