summaryrefslogtreecommitdiff
path: root/libavcodec/indeo4.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/indeo4.c')
-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);
}