Commit 41f93f94 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/clearvideo: Check remaining data in P frames

Fixes: Timeout (19sec -> 419msec)
Fixes: 13411/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CLEARVIDEO_fuzzer-5733153811988480

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent dd2a2a51
...@@ -555,6 +555,9 @@ static int clv_decode_frame(AVCodecContext *avctx, void *data, ...@@ -555,6 +555,9 @@ static int clv_decode_frame(AVCodecContext *avctx, void *data,
} else { } else {
int plane; int plane;
if (c->pmb_width * c->pmb_height > 8LL*(buf_size - bytestream2_tell(&gb)))
return AVERROR_INVALIDDATA;
if ((ret = ff_reget_buffer(avctx, c->pic)) < 0) if ((ret = ff_reget_buffer(avctx, c->pic)) < 0)
return ret; return ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment