[FFmpeg-devel] [PATCH] avcodec/cbs: use av_fast_realloc() in cbs_insert_unit()

James Almer jamrial at gmail.com
Sat May 2 19:45:43 EEST 2020


On 5/2/2020 1:39 PM, Michael Niedermayer wrote:
> On Sat, Apr 11, 2020 at 11:01:41AM -0300, James Almer wrote:
>> Fixes: Timeout
>> Fixes: 20791/clusterfuzz-testcase-minimized-ffmpeg_BSF_AV1_FRAME_SPLIT_fuzzer-5659537719951360
>> Fixes: 21214/clusterfuzz-testcase-minimized-ffmpeg_BSF_MPEG2_METADATA_fuzzer-5165560875974656
>> Fixes: 21247/clusterfuzz-testcase-minimized-ffmpeg_BSF_H264_METADATA_fuzzer-5715175257931776
>>
>> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
>> Signed-off-by: James Almer <jamrial at gmail.com>
>> ---
>> This can be ported to av_fast_realloc_array() once that's committed.
>>
>>  libavcodec/cbs.c | 37 ++++++++++++++++---------------------
>>  libavcodec/cbs.h |  7 +++++++
>>  2 files changed, 23 insertions(+), 21 deletions(-)
> 
> Not sure we decided on which fix to push, but something
> should be applied
> 
> thx

Mark had some comments and it seemed he preferred your approach in
"avcodec/cbs: Allocate more CodedBitstreamUnit at once in
cbs_insert_unit()", but not sure if he was expecting some changes or
not, so unless av_fast_realloc_array() by Andreas is committed and then
used here, feel free to push your patch instead.


More information about the ffmpeg-devel mailing list