Benchanything's picture
Add 300 CheckerBench tasks, dataset card, and restoration tools (part 4)
4eaabb5 verified
Raw History Blame Contribute Delete
575 Bytes
diff --git a/OpenEXR/IlmImf/ImfHeader.cpp b/OpenEXR/IlmImf/ImfHeader.cpp
index e29ec421..f3655e3f 100644
--- a/OpenEXR/IlmImf/ImfHeader.cpp
+++ b/OpenEXR/IlmImf/ImfHeader.cpp
@@ -902,7 +902,7 @@ Header::sanityCheck (bool isTiled, bool isMultipartFile) const
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 &&