diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-03-01 17:56:23 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-03-03 01:03:29 +0100 |
commit | 6191198c216e0ca38d6e65270d2f1b054584a0a9 (patch) | |
tree | 9379c14159f2959bb16fe6ea6939601934e2d059 | |
parent | 3b0b35150df4a9da75105662d145603151de6714 (diff) | |
download | ffmpeg-6191198c216e0ca38d6e65270d2f1b054584a0a9.tar.gz |
avcodec/interplayvideo: Fix timeout from lack of bitstream end check
Fixes: 697/clusterfuzz-testcase-6111250582863872
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/interplayvideo.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c index 8d2f3ab48c..df3314d4b7 100644 --- a/libavcodec/interplayvideo.c +++ b/libavcodec/interplayvideo.c @@ -928,6 +928,8 @@ static void ipvideo_decode_opcodes(IpvideoContext *s, AVFrame *frame) init_get_bits(&gb, s->decoding_map, s->decoding_map_size * 8); for (y = 0; y < s->avctx->height; y += 8) { for (x = 0; x < s->avctx->width; x += 8) { + if (get_bits_left(&gb) < 4) + return; opcode = get_bits(&gb, 4); ff_tlog(s->avctx, |