Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-06-08 14:58:47 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2017-06-16 02:05:29 +0300
commite93ffb488844e5d5a06c219715dc3e5913181561 (patch)
treef407aadfc17084c86ce7e21d9155f7db2932bc38
parentf7ea74422f252718bd2d84ade9bb8fd0a83ab0a0 (diff)
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 594c56d163..85d5fa3e7a 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);
}