summaryrefslogtreecommitdiff
path: root/libavcodec/indeo3.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/indeo3.c')
-rw-r--r--libavcodec/indeo3.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index 7e4cf01206..24e2160e5a 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -196,6 +196,10 @@ static unsigned long iv_decode_frame(Indeo3DecodeContext *s,
hdr_height = le2me_16(*(uint16_t *)buf_pos);
buf_pos += 2;
hdr_width = le2me_16(*(uint16_t *)buf_pos);
+
+ if(avcodec_check_dimensions(NULL, hdr_width, hdr_height))
+ return -1;
+
buf_pos += 2;
chroma_height = ((hdr_height >> 2) + 3) & 0x7ffc;
chroma_width = ((hdr_width >> 2) + 3) & 0x7ffc;