Fixes: Timeout (18sec -> 7sec) Fixes: 14835/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WCMV_fuzzer-5646714897170432
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> --- libavcodec/wcmv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/wcmv.c b/libavcodec/wcmv.c index 2988c15b23..0d60b9fe1f 100644 --- a/libavcodec/wcmv.c +++ b/libavcodec/wcmv.c @@ -154,6 +154,9 @@ static int decode_frame(AVCodecContext *avctx, bytestream2_seek(&gb, 2, SEEK_SET); } + if (bytestream2_get_bytes_left(&gb) < 8LL * blocks) + return AVERROR_INVALIDDATA; + if (s->prev_frame->data[0]) { ret = av_frame_copy(frame, s->prev_frame); if (ret < 0) -- 2.21.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".