tools/tiffcp.c:1342: error: Integer Overflow L2
  ([0, max(0, `in->tif_dir.td_tilelength`)] - 1):unsigned32 by call to `TIFFReadTile`.

tools/tiffcp.c:1316:1: Parameter `in->tif_dir.td_tilelength`
1314. }
1315. 
1316. DECLAREreadFunc(readContigTilesIntoBuffer)
      ^
1317. {
1318. 	int status = 1;

tools/tiffcp.c:1319:21: Call
1317. {
1318. 	int status = 1;
1319. 	tsize_t tilesize = TIFFTileSize(in);
                          ^
1320. 	tdata_t tilebuf;
1321. 	uint32 imagew = TIFFScanlineSize(in);

libtiff/tif_tile.c:272:1: Parameter `tif->tif_dir.td_tilelength`
  270. 	return (TIFFVTileSize64(tif, tif->tif_dir.td_tilelength));
  271. }
  272. tmsize_t
       ^
  273. TIFFTileSize(TIFF* tif)
  274. {

libtiff/tif_tile.c:278:4: Call
  276. 	uint64 m;
  277. 	tmsize_t n;
  278. 	m=TIFFTileSize64(tif);
          ^
  279. 	n=(tmsize_t)m;
  280. 	if ((uint64)n!=m)

libtiff/tif_tile.c:267:1: Parameter `tif->tif_dir.td_tilelength`
    265.  * Compute the # bytes in a row-aligned tile.
    266.  */
    267. uint64
         ^
    268. TIFFTileSize64(TIFF* tif)
    269. {

libtiff/tif_tile.c:270:10: Call
    268. TIFFTileSize64(TIFF* tif)
    269. {
    270. 	return (TIFFVTileSize64(tif, tif->tif_dir.td_tilelength));
                  ^
    271. }
    272. tmsize_t

libtiff/tif_tile.c:200:1: Parameter `tif->tif_dir.td_tilelength`
      198.  * Compute the # bytes in a variable length, row-aligned tile.
      199.  */
      200. uint64
           ^
      201. TIFFVTileSize64(TIFF* tif, uint32 nrows)
      202. {

tools/tiffcp.c:1322:18: Call
1320. 	tdata_t tilebuf;
1321. 	uint32 imagew = TIFFScanlineSize(in);
1322. 	uint32 tilew  = TIFFTileRowSize(in);
                       ^
1323. 	int iskew = imagew - tilew;
1324. 	uint8* bufp = (uint8*) buf;

libtiff/tif_tile.c:181:1: Parameter `tif->tif_dir.td_tilelength`
  179. 	return (tilerowsize);
  180. }
  181. tmsize_t
       ^
  182. TIFFTileRowSize(TIFF* tif)
  183. {

libtiff/tif_tile.c:187:4: Call
  185. 	uint64 m;
  186. 	tmsize_t n;
  187. 	m=TIFFTileRowSize64(tif);
          ^
  188. 	n=(tmsize_t)m;
  189. 	if ((uint64)n!=m)

libtiff/tif_tile.c:143:1: Parameter `tif->tif_dir.td_tilelength`
    141.  * Compute the # bytes in each row of a tile.
    142.  */
    143. uint64
         ^
    144. TIFFTileRowSize64(TIFF* tif)
    145. {

tools/tiffcp.c:1342:8: Call
1340. 
1341. 		for (col = 0; col < imagewidth; col += tw) {
1342. 			if (TIFFReadTile(in, tilebuf, col, row, 0, 0) < 0
             ^
1343. 			    && !ignore) {
1344. 				TIFFError(TIFFFileName(in),

libtiff/tif_read.c:659:1: Parameter `tif->tif_dir.td_tilelength`
  657.  * tile is selected by the (x,y,z,s) coordinates.
  658.  */
  659. tmsize_t
       ^
  660. TIFFReadTile(TIFF* tif, void* buf, uint32 x, uint32 y, uint32 z, uint16 s)
  661. {

libtiff/tif_read.c:664:10: Call
  662. 	if (!TIFFCheckRead(tif, 1) || !TIFFCheckTile(tif, x, y, z, s))
  663. 		return ((tmsize_t)(-1));
  664. 	return (TIFFReadEncodedTile(tif,
                ^
  665. 	    TIFFComputeTile(tif, x, y, z, s), buf, (tmsize_t)(-1)));
  666. }

libtiff/tif_read.c:672:1: Parameter `tif->tif_dir.td_tilelength`
    670.  * amount into the user-supplied buffer.
    671.  */
    672. tmsize_t
         ^
    673. TIFFReadEncodedTile(TIFF* tif, uint32 tile, void* buf, tmsize_t size)
    674. {

libtiff/tif_read.c:709:6: Call
    707. 	else if (size > tilesize)
    708. 		size = tilesize;
    709. 	if (TIFFFillTile(tif, tile) && (*tif->tif_decodetile)(tif,
              ^
    710. 	    (uint8*) buf, size, (uint16)(tile/td->td_stripsperimage))) {
    711. 		(*tif->tif_postdecode)(tif, (uint8*) buf, size);

libtiff/tif_read.c:833:1: Parameter `tif->tif_dir.td_tilelength`
      831.  * expanded, as necessary, to hold the tile's data.
      832.  */
      833. int
           ^
      834. TIFFFillTile(TIFF* tif, uint32 tile)
      835. {

libtiff/tif_read.c:942:10: Call
      940. 		}
      941. 	}
      942. 	return (TIFFStartTile(tif, tile));
                    ^
      943. }
      944. 

libtiff/tif_read.c:1031:1: <LHS trace>
1029.  * tile has just been read in.
1030.  */
1031. static int
      ^
1032. TIFFStartTile(TIFF* tif, uint32 tile)
1033. {

libtiff/tif_read.c:1031:1: Parameter `tif->tif_dir.td_tilelength`
        1029.  * tile has just been read in.
        1030.  */
        1031. static int
              ^
        1032. TIFFStartTile(TIFF* tif, uint32 tile)
        1033. {

libtiff/tif_read.c:1053:19: Binary operation: ([0, max(0, in->tif_dir.td_tilelength)] - 1):unsigned32 by call to `TIFFReadTile` 
        1051.         }
        1052. 	tif->tif_row = (tile % howmany32) * td->td_tilelength;
        1053.         howmany32=TIFFhowmany_32(td->td_imagelength, td->td_tilelength);
                                ^
        1054.         if (howmany32 == 0) {
        1055.                 TIFFErrorExt(tif->tif_clientdata,module,"Zero tiles");
