--- a/tools/tiffcp.c 2018-11-10 21:03:11.000000000 +0530
+++ b/tools/tiffcp.c 2019-01-28 16:38:38.012407743 +0530
@@ -1435,6 +1435,12 @@
status = 0;
goto done;
}
+ if (0xFFFFFFFF / tilew < spp)
+ {
+ TIFFError(TIFFFileName(in), "Error, either TileWidth (%u) or BitsPerSample (%u) is too large", tilew, bps);
+ status = 0;
+ goto done;
+ }
bytes_per_sample = bps/8;
for (row = 0; row < imagelength; row += tl) {