aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-06-08 13:58:47 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-06-20 02:05:08 +0200
commit2dcae36de1b85f8054a77c3b82f5640c7f10f384 (patch)
treee548f30674375ec9c55bf6d3cdf8bc30b38e0e18
parent968036dbf97f3d8c7a70a1072a2a4e4af035fdce (diff)
downloadffmpeg-2dcae36de1b85f8054a77c3b82f5640c7f10f384.tar.gz
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@niedermayer.cc> (cherry picked from commit a3b5b60bdf451faefeeec07c4e684a251968bf2d) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/indeo4.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c
index 0065b52c75..1bf402551b 100644
--- a/libavcodec/indeo4.c
+++ b/libavcodec/indeo4.c
@@ -246,6 +246,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);
}