tools/tiffcrop.c:6746: error: Integer Overflow L2
  ([0, +oo] - 1):unsigned32 by call to `writeCroppedImage`.

tools/tiffcrop.c:6727:1: Parameter `(*out)->tif_dir.td_imagedepth`
6725.   } /* end extractImageSection */
6726. 
6727. static int 
      ^
6728. writeSelections(TIFF *in, TIFF **out, struct crop_mask *crop, 
6729.                 struct image_data *image, struct dump_opts *dump,

tools/tiffcrop.c:6743:14: Call
6741.          autoindex = 0;
6742.          crop_buff = seg_buffs[0].buffer;
6743.          if (update_output_file (out, mp, autoindex, filename, page))
                   ^
6744.            return (1);
6745.          page_count = total_pages;

tools/tiffcrop.c:2037:1: Parameter `(*tiffout)->tif_dir.td_imagedepth`
  2035.  * so TIFFTAG PAGENUM will be correct in image.
  2036.  */
  2037. static int 
        ^
  2038. update_output_file (TIFF **tiffout, char *mode, int autoindex,
  2039.                     char *outname, unsigned int *page)

tools/tiffcrop.c:6746:14: Call
6744.            return (1);
6745.          page_count = total_pages;
6746.          if (writeCroppedImage(in, *out, image, dump,
                   ^
6747.                                crop->combined_width, 
6748.                                crop->combined_length,

tools/tiffcrop.c:7569:1: Parameter `out->tif_dir.td_imagedepth`
  7567.  * then passed in as an argument.
  7568.  */
  7569. static int  
        ^
  7570. writeCroppedImage(TIFF *in, TIFF *out, struct image_data *image, 
  7571.                   struct dump_opts *dump, uint32 width, uint32 length, 

tools/tiffcrop.c:7812:11: Call
  7810.     if (config == PLANARCONFIG_CONTIG)
  7811.       {
  7812.       if (writeBufferToContigTiles (out, crop_buff, length, width, spp, dump))
                  ^
  7813.         TIFFError("","Unable to write contiguous tile data for page %d", pagenum);
  7814.       }

tools/tiffcrop.c:1194:1: Parameter `out->tif_dir.td_imagedepth`
    1192.  * to be written out as a tile.
    1193.  */
    1194. static int writeBufferToContigTiles (TIFF* out, uint8* buf, uint32 imagelength,
          ^
    1195. 				       uint32 imagewidth, tsample_t spp, 
    1196.                                        struct dump_opts* dump)

tools/tiffcrop.c:1251:11: Call
    1249.         }
    1250. 
    1251.       if (TIFFWriteTile(out, tilebuf, col, row, 0, 0) < 0)
                    ^
    1252.         {
    1253. 	TIFFError("writeBufferToContigTiles",

libtiff/tif_write.c:312:1: Parameter `tif->tif_dir.td_imagedepth`
      310.  * tile is selected by the (x,y,z,s) coordinates.
      311.  */
      312. tmsize_t
           ^
      313. TIFFWriteTile(TIFF* tif, void* buf, uint32 x, uint32 y, uint32 z, uint16 s)
      314. {

libtiff/tif_write.c:315:7: Call
      313. TIFFWriteTile(TIFF* tif, void* buf, uint32 x, uint32 y, uint32 z, uint16 s)
      314. {
      315. 	if (!TIFFCheckTile(tif, x, y, z, s))
                 ^
      316. 		return ((tmsize_t)(-1));
      317. 	/*

libtiff/tif_tile.c:74:1: <LHS trace>
72.  * against the image bounds.
73.  */
74. int
    ^
75. TIFFCheckTile(TIFF* tif, uint32 x, uint32 y, uint32 z, uint16 s)
76. {

libtiff/tif_tile.c:74:1: Parameter `z`
        72.  * against the image bounds.
        73.  */
        74. int
            ^
        75. TIFFCheckTile(TIFF* tif, uint32 x, uint32 y, uint32 z, uint16 s)
        76. {

libtiff/tif_tile.c:94:3: Binary operation: ([0, +oo] - 1):unsigned32 by call to `writeCroppedImage` 
        92. 	}
        93. 	if (z >= td->td_imagedepth) {
        94. 		TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
              ^
        95. 			     "%lu: Depth out of range, max %lu",
        96. 			     (unsigned long) z,
