diff --git a/libavcodec/exr.c b/libavcodec/exr.c index 49ba7fd6de..b6bf87ab81 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -1829,8 +1829,8 @@ static int decode_header(EXRContext *s, AVFrame *frame) dx = bytestream2_get_le32(gb); dy = bytestream2_get_le32(gb); - s->w = dx - sx + 1; - s->h = dy - sy + 1; + s->w = (unsigned)dx - sx + 1; + s->h = (unsigned)dy - sy + 1; continue; } else if ((var_size = check_header_variable(s, "lineOrder",