tools/tiffcrop.c:6905: error: Integer Overflow L2
  ([min(1, `out->tif_dir.td_imagedepth`), 4294967294] + [0, 4294967294-min(1, `out->tif_dir.td_imagedepth`)]):unsigned32 by call to `writeSingleSection`.

tools/tiffcrop.c:6863:1: Parameter `out->tif_dir.td_imagedepth`
6861.   } /* end writeRegions */
6862. 
6863. static int
      ^
6864. writeImageSections(TIFF *in, TIFF *out, struct image_data *image,
6865. 		   struct pagedef *page, struct pageseg *sections,

tools/tiffcrop.c:6905:9: Call
6903. 
6904.   /* call the write routine here instead of outside the loop */
6905.     if (writeSingleSection(in, out, image, dump, width, length, hres, vres, sect_buff))
              ^
6906.       {
6907.       TIFFError("writeImageSections", "Unable to write image section");

tools/tiffcrop.c:6921:1: Parameter `out->tif_dir.td_imagedepth`
  6919.  * original code assumes we are always copying all samples.
  6920.  */
  6921. static int  
        ^
  6922. writeSingleSection(TIFF *in, TIFF *out, struct image_data *image,
  6923.                    struct dump_opts *dump, uint32 width, uint32 length,

tools/tiffcrop.c:7169:7: Call
  7167.     {
  7168.     if (config == PLANARCONFIG_CONTIG)
  7169.       writeBufferToContigTiles (out, sect_buff, length, width, spp, dump);
              ^
  7170.     else
  7171.       writeBufferToSeparateTiles (out, sect_buff, length, width, spp, dump);

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:1252:11: Call
    1250.         }
    1251. 
    1252.       if (TIFFWriteTile(out, tilebuf, col, row, 0, 0) < 0)
                    ^
    1253.         {
    1254. 	TIFFError("writeBufferToContigTiles",

libtiff/tif_write.c:336:1: Parameter `tif->tif_dir.td_imagedepth`
      334.  * tile is selected by the (x,y,z,s) coordinates.
      335.  */
      336. tmsize_t
           ^
      337. TIFFWriteTile(TIFF* tif, void* buf, uint32 x, uint32 y, uint32 z, uint16 s)
      338. {

libtiff/tif_write.c:339:7: Call
      337. TIFFWriteTile(TIFF* tif, void* buf, uint32 x, uint32 y, uint32 z, uint16 s)
      338. {
      339. 	if (!TIFFCheckTile(tif, x, y, z, s))
                 ^
      340. 		return ((tmsize_t)(-1));
      341. 	/*

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_write.c:348:6: Call
      346. 	 */
      347. 	return (TIFFWriteEncodedTile(tif,
      348. 	    TIFFComputeTile(tif, x, y, z, s), buf, (tmsize_t)(-1)));
                ^
      349. }
      350. 

libtiff/tif_tile.c:37:1: Parameter `tif->tif_dir.td_imagedepth`
        35.  * Compute which tile an (x,y,z,s) value is in.
        36.  */
        37. uint32
            ^
        38. TIFFComputeTile(TIFF* tif, uint32 x, uint32 y, uint32 z, uint16 s)
        39. {

libtiff/tif_write.c:347:10: Call
      345. 	 *     after the output buffer is setup in TIFFWriteBufferSetup.
      346. 	 */
      347. 	return (TIFFWriteEncodedTile(tif,
                    ^
      348. 	    TIFFComputeTile(tif, x, y, z, s), buf, (tmsize_t)(-1)));
      349. }

libtiff/tif_write.c:363:1: Parameter `tif->tif_dir.td_imagedepth`
        361.  *     the image on each write (as TIFFWriteScanline does).
        362.  */
        363. tmsize_t
             ^
        364. TIFFWriteEncodedTile(TIFF* tif, uint32 tile, void* data, tmsize_t cc)
        365. {

libtiff/tif_write.c:371:7: Call
        369.         uint32 howmany32;
        370. 
        371. 	if (!WRITECHECKTILES(tif, module))
                   ^
        372. 		return ((tmsize_t)(-1));
        373. 	td = &tif->tif_dir;

libtiff/tif_write.c:532:1: Parameter `tif->tif_dir.td_imagedepth`
          530.  * that important information is not changed.
          531.  */
          532. int
               ^
          533. TIFFWriteCheck(TIFF* tif, int tiles, const char* module)
          534. {

libtiff/tif_write.c:579:46: Call
          577. 		}
          578. 	}
          579. 	if (tif->tif_dir.td_stripoffset == NULL && !TIFFSetupStrips(tif)) {
                                                            ^
          580. 		tif->tif_dir.td_nstrips = 0;
          581. 		TIFFErrorExt(tif->tif_clientdata, module, "No space for %s arrays",

libtiff/tif_write.c:492:1: Parameter `tif->tif_dir.td_imagedepth`
            490.     (TIFFFieldSet(tif,f) && (tif)->tif_dir.td_imagelength == 0)
            491. 
            492. int
                 ^
            493. TIFFSetupStrips(TIFF* tif)
            494. {

libtiff/tif_write.c:500:29: Call
            498. 		td->td_stripsperimage =
            499. 		    isUnspecified(tif, FIELD_TILEDIMENSIONS) ?
            500. 			td->td_samplesperpixel : TIFFNumberOfTiles(tif);
                                             ^
            501. 	else
            502. 		td->td_stripsperimage =

libtiff/tif_tile.c:114:1: <LHS trace>
112.  * Compute how many tiles are in an image.
113.  */
114. uint32
     ^
115. TIFFNumberOfTiles(TIFF* tif)
116. {

libtiff/tif_tile.c:114:1: Parameter `tif->tif_dir.td_imagedepth`
              112.  * Compute how many tiles are in an image.
              113.  */
              114. uint32
                   ^
              115. TIFFNumberOfTiles(TIFF* tif)
              116. {

libtiff/tif_tile.c:114:1: <RHS trace>
112.  * Compute how many tiles are in an image.
113.  */
114. uint32
     ^
115. TIFFNumberOfTiles(TIFF* tif)
116. {

libtiff/tif_tile.c:114:1: Parameter `tif->tif_dir.td_imagedepth`
              112.  * Compute how many tiles are in an image.
              113.  */
              114. uint32
                   ^
              115. TIFFNumberOfTiles(TIFF* tif)
              116. {

libtiff/tif_tile.c:133:6: Binary operation: ([min(1, out->tif_dir.td_imagedepth), 4294967294] + [0, 4294967294-min(1, out->tif_dir.td_imagedepth)]):unsigned32 by call to `writeSingleSection` 
              131. 	    TIFFhowmany_32(td->td_imagelength, dy),
              132. 	    "TIFFNumberOfTiles"),
              133. 	    TIFFhowmany_32(td->td_imagedepth, dz), "TIFFNumberOfTiles");
                        ^
              134. 	if (td->td_planarconfig == PLANARCONFIG_SEPARATE)
              135. 		ntiles = _TIFFMultiply32(tif, ntiles, td->td_samplesperpixel,
