diff --git a/tools/tiffcp.c b/tools/tiffcp.c index f0ee2c02..8c81aa4f 100644 --- a/tools/tiffcp.c +++ b/tools/tiffcp.c @@ -41,6 +41,7 @@ #include #include #include +#include #include @@ -1416,7 +1417,7 @@ DECLAREreadFunc(readSeparateTilesIntoBuffer) uint32 row; uint16 bps = 0, bytes_per_sample; - if (spp > (0x7fffffff / tilew)) + if (spp > (INT_MAX / tilew)) { TIFFError(TIFFFileName(in), "Error, cannot handle that much samples per tile row (Tile Width * Samples/Pixel)"); return 0;