mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avcodec/av1dec: reset the fragment on reading failure
Fixes: NULL pointer dereference Fixes: 59359/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AV1_fuzzer-6726080594313216 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
9a9b56c870
commit
8c6b931f4c
@ -1460,6 +1460,7 @@ static int av1_receive_frame(AVCodecContext *avctx, AVFrame *frame)
|
||||
|
||||
ret = ff_cbs_read_packet(s->cbc, &s->current_obu, s->pkt);
|
||||
if (ret < 0) {
|
||||
ff_cbs_fragment_reset(&s->current_obu);
|
||||
av_packet_unref(s->pkt);
|
||||
av_log(avctx, AV_LOG_ERROR, "Failed to read packet.\n");
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user