aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libavcodec/exr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index fe5ad69293..171cb4366c 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -1511,6 +1511,7 @@ static int decode_header(EXRContext *s, AVFrame *frame)
ymax = bytestream2_get_le32(&s->gb);
if (xmin > xmax || ymin > ymax ||
+ ymax == INT_MAX || xmax == INT_MAX ||
(unsigned)xmax - xmin >= INT_MAX ||
(unsigned)ymax - ymin >= INT_MAX) {
ret = AVERROR_INVALIDDATA;