[FFmpeg-cvslog] avcodec/indeo4: Check for end of bitstream in decode_mb_info()
Michael Niedermayer
git at videolan.org
Mon Jul 16 20:03:38 EEST 2018
ffmpeg | branch: release/4.0 | Michael Niedermayer <michael at niedermayer.cc> | Mon Jul 2 01:26:44 2018 +0200| [3bf80c7b223ed06b32e215fd743fbe2eb5d61459] | committer: Michael Niedermayer
avcodec/indeo4: Check for end of bitstream in decode_mb_info()
Fixes: Timeout
Fixes: 8776/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO4_fuzzer-5361788798369792
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 267ba2aa96354c5b6a1ea89b2943fbd7a4893862)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3bf80c7b223ed06b32e215fd743fbe2eb5d61459
---
libavcodec/indeo4.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c
index 7dff9db877..15ad6f8afc 100644
--- a/libavcodec/indeo4.c
+++ b/libavcodec/indeo4.c
@@ -492,6 +492,11 @@ static int decode_mb_info(IVI45DecContext *ctx, IVIBandDesc *band,
mb->b_mv_x =
mb->b_mv_y = 0;
+ if (get_bits_left(&ctx->gb) < 1) {
+ av_log(avctx, AV_LOG_ERROR, "Insufficient input for mb info\n");
+ return AVERROR_INVALIDDATA;
+ }
+
if (get_bits1(&ctx->gb)) {
if (ctx->frame_type == IVI4_FRAMETYPE_INTRA) {
av_log(avctx, AV_LOG_ERROR, "Empty macroblock in an INTRA picture!\n");
More information about the ffmpeg-cvslog
mailing list