[FFmpeg-cvslog] avcodec/indeo4: Check remaining data in Pic hdr extension parsing code

Michael Niedermayer git at videolan.org
Sun Jun 18 17:34:31 EEST 2017


ffmpeg | branch: release/3.1 | Michael Niedermayer <michael at niedermayer.cc> | Thu Jun  8 13:58:47 2017 +0200| [26afadbd29359dea996d7fb2fd647bf9cbb59584] | committer: Michael Niedermayer

avcodec/indeo4: Check remaining data in Pic hdr extension parsing code

Fixes: Timeout
Fixes: 2115/clusterfuzz-testcase-minimized-6594111748440064

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 a3b5b60bdf451faefeeec07c4e684a251968bf2d)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=26afadbd29359dea996d7fb2fd647bf9cbb59584
---

 libavcodec/indeo4.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c
index 69f78c90b2..53bb5a239c 100644
--- a/libavcodec/indeo4.c
+++ b/libavcodec/indeo4.c
@@ -237,6 +237,8 @@ static int decode_pic_hdr(IVI45DecContext *ctx, AVCodecContext *avctx)
     /* skip picture header extension if any */
     while (get_bits1(&ctx->gb)) {
         ff_dlog(avctx, "Pic hdr extension encountered!\n");
+        if (get_bits_left(&ctx->gb) < 10)
+            return AVERROR_INVALIDDATA;
         skip_bits(&ctx->gb, 8);
     }
 



More information about the ffmpeg-cvslog mailing list