summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/indeo2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/indeo2.c b/libavcodec/indeo2.c
index 4971b84308..09cb560d8e 100644
--- a/libavcodec/indeo2.c
+++ b/libavcodec/indeo2.c
@@ -56,7 +56,7 @@ static int ir2_decode_plane(Ir2Context *ctx, int width, int height, uint8_t *dst
int j;
int out = 0;
- if (width & 1)
+ if ((width & 1) || width * height / (2*(IR2_CODES - 0x7F)) > get_bits_left(&ctx->gb))
return AVERROR_INVALIDDATA;
/* first line contain absolute values, other lines contain deltas */