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

tools/tiffcrop.c:751:1: Parameter `in->tif_dir.td_tilelength`
749.  * extractContigSampleXX routines.
750.  */
751. static int readContigTilesIntoBuffer (TIFF* in, uint8* buf, 
     ^
752.                                       uint32 imagelength, 
753.                                       uint32 imagewidth, 

tools/tiffcrop.c:765:26: Call
763.   uint32 bytes_per_sample, bytes_per_pixel;
764.   uint32 trailing_bits, prev_trailing_bits;
765.   uint32 tile_rowsize  = TIFFTileRowSize(in);
                              ^
766.   uint32 src_offset, dst_offset;
767.   uint32 row_offset, col_offset;

libtiff/tif_tile.c:184:1: Parameter `tif->tif_dir.td_tilelength`
  182. 	return (TIFFhowmany8_64(rowsize));
  183. }
  184. tmsize_t
       ^
  185. TIFFTileRowSize(TIFF* tif)
  186. {

libtiff/tif_tile.c:190:4: Call
  188. 	uint64 m;
  189. 	tmsize_t n;
  190. 	m=TIFFTileRowSize64(tif);
          ^
  191. 	n=(tmsize_t)m;
  192. 	if ((uint64)n!=m)

libtiff/tif_tile.c:169:1: Parameter `tif->tif_dir.td_tilelength`
    167.  * Compute the # bytes in each row of a tile.
    168.  */
    169. uint64
         ^
    170. TIFFTileRowSize64(TIFF* tif)
    171. {

tools/tiffcrop.c:772:22: Call
770.   unsigned char *dst = NULL;
771.   tsize_t tbytes = 0, tile_buffsize = 0;
772.   tsize_t tilesize = TIFFTileSize(in);
                          ^
773.   unsigned char *tilebuf = NULL;
774. 

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

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

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

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

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

tools/tiffcrop.c:810:16: Call
808.     for (col = 0; col < imagewidth; col += tw)
809.       {
810.       tbytes = TIFFReadTile(in, tilebuf, col, row, 0, 0);
                    ^
811.       if (tbytes < tilesize  && !ignore)
812.         {

libtiff/tif_read.c:604:1: Parameter `tif->tif_dir.td_tilelength`
  602.  * tile is selected by the (x,y,z,s) coordinates.
  603.  */
  604. tmsize_t
       ^
  605. TIFFReadTile(TIFF* tif, void* buf, uint32 x, uint32 y, uint32 z, uint16 s)
  606. {

libtiff/tif_read.c:609:10: Call
  607. 	if (!TIFFCheckRead(tif, 1) || !TIFFCheckTile(tif, x, y, z, s))
  608. 		return ((tmsize_t)(-1));
  609. 	return (TIFFReadEncodedTile(tif,
                ^
  610. 	    TIFFComputeTile(tif, x, y, z, s), buf, (tmsize_t)(-1)));
  611. }

libtiff/tif_read.c:617:1: Parameter `tif->tif_dir.td_tilelength`
    615.  * amount into the user-supplied buffer.
    616.  */
    617. tmsize_t
         ^
    618. TIFFReadEncodedTile(TIFF* tif, uint32 tile, void* buf, tmsize_t size)
    619. {

libtiff/tif_read.c:636:6: Call
    634. 	else if (size > tilesize)
    635. 		size = tilesize;
    636. 	if (TIFFFillTile(tif, tile) && (*tif->tif_decodetile)(tif,
              ^
    637. 	    (uint8*) buf, size, (uint16)(tile/td->td_stripsperimage))) {
    638. 		(*tif->tif_postdecode)(tif, (uint8*) buf, size);

libtiff/tif_read.c:757:1: Parameter `tif->tif_dir.td_tilelength`
      755.  * expanded, as necessary, to hold the tile's data.
      756.  */
      757. int
           ^
      758. TIFFFillTile(TIFF* tif, uint32 tile)
      759. {

libtiff/tif_read.c:853:10: Call
      851. 		}
      852. 	}
      853. 	return (TIFFStartTile(tif, tile));
                    ^
      854. }
      855. 

libtiff/tif_read.c:933:1: <LHS trace>
931.  * tile has just been read in.
932.  */
933. static int
     ^
934. TIFFStartTile(TIFF* tif, uint32 tile)
935. {

libtiff/tif_read.c:933:1: Parameter `tif->tif_dir.td_tilelength`
        931.  * tile has just been read in.
        932.  */
        933. static int
             ^
        934. TIFFStartTile(TIFF* tif, uint32 tile)
        935. {

libtiff/tif_read.c:947:2: Binary operation: ([0, in->tif_dir.td_tilelength] - 1):unsigned32 by call to `TIFFReadTile` 
        945. 	    (tile % TIFFhowmany_32(td->td_imagewidth, td->td_tilewidth)) *
        946. 		td->td_tilelength;
        947. 	tif->tif_col =
              ^
        948. 	    (tile % TIFFhowmany_32(td->td_imagelength, td->td_tilelength)) *
        949. 		td->td_tilewidth;
