aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-06-13 16:03:14 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2020-06-14 19:17:07 +0200
commit75e2ac4f0752649a0b9486e6825ef68341ee974d (patch)
tree328f56fddf04de68c4de97bc68d57a9d42940c6a
parente361785ee05cc75d3caacf2f254160b0336f5358 (diff)
downloadffmpeg-75e2ac4f0752649a0b9486e6825ef68341ee974d.tar.gz
avcodec/mv30: check mode_size vs. input space
Fixes: Timeout (longer than my patience vs 1sec) Fixes: 22984/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MV30_fuzzer-5630021988515840 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/mv30.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mv30.c b/libavcodec/mv30.c
index 013a5753fe..76b9170eaf 100644
--- a/libavcodec/mv30.c
+++ b/libavcodec/mv30.c
@@ -410,6 +410,9 @@ static int decode_intra(AVCodecContext *avctx, GetBitContext *gb, AVFrame *frame
int ret;
mgb = *gb;
+ if (get_bits_left(gb) < s->mode_size * 8)
+ return AVERROR_INVALIDDATA;
+
skip_bits_long(gb, s->mode_size * 8);
linesize[0] = frame->linesize[0];