From 6bad53af7eebed507564dd5fc90320e4c6a6c0bc Mon Sep 17 00:00:00 2001 From: Peter Hillman <peterh@wetafx.co.nz> Date: Mon, 20 Jan 2020 09:07:02 +1300 Subject: [PATCH 01/23] Force tile sizes to be less than INT_MAX bytes, in line with the maximum dimensions of data windows Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> --- OpenEXR/IlmImf/ImfHeader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/IlmImf/ImfHeader.cpp +++ b/IlmImf/ImfHeader.cpp @@ -914,7 +914,7 @@ Header::sanityCheck (bool isTiled, bool const TileDescription &tileDesc = tileDescription(); - if (tileDesc.xSize <= 0 || tileDesc.ySize <= 0) + if (tileDesc.xSize <= 0 || tileDesc.ySize <= 0 || tileDesc.xSize > INT_MAX || tileDesc.ySize > INT_MAX ) throw IEX_NAMESPACE::ArgExc ("Invalid tile size in image header."); if (maxTileWidth > 0 &&