tools/tiffcrop.c:7040: 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:6998:1: Parameter `out->tif_dir.td_imagedepth`
6996.   } /* end writeRegions */
6997. 
6998. static int
      ^
6999. writeImageSections(TIFF *in, TIFF *out, struct image_data *image,
7000. 		   struct pagedef *page, struct pageseg *sections,

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

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

tools/tiffcrop.c:7311:7: Call
  7309.     {
  7310.     if (config == PLANARCONFIG_CONTIG)
  7311.       writeBufferToContigStrips (out, sect_buff, length);
              ^
  7312.     else
  7313.       writeBufferToSeparateStrips(out, sect_buff, length, width, spp, dump);

tools/tiffcrop.c:1114:1: Parameter `out->tif_dir.td_imagedepth`
    1112.   }
    1113. 
    1114. static int writeBufferToContigStrips(TIFF* out, uint8* buf, uint32 imagelength)
          ^
    1115.   {
    1116.   uint32 row, nrows, rowsperstrip;

tools/tiffcrop.c:1126:9: Call
    1124. 	     imagelength - row : rowsperstrip;
    1125.     stripsize = TIFFVStripSize(out, nrows);
    1126.     if (TIFFWriteEncodedStrip(out, strip++, buf, stripsize) < 0)
                  ^
    1127.       {
    1128.       TIFFError(TIFFFileName(out), "Error, can't write strip %u", strip - 1);

libtiff/tif_write.c:211:1: Parameter `tif->tif_dir.td_imagedepth`
      209.  * NB: Image length must be setup before writing.
      210.  */
      211. tmsize_t
           ^
      212. TIFFWriteEncodedStrip(TIFF* tif, uint32 strip, void* data, tmsize_t cc)
      213. {

libtiff/tif_write.c:218:7: Call
      216. 	uint16 sample;
      217. 
      218. 	if (!WRITECHECKSTRIPS(tif, module))
                 ^
      219. 		return ((tmsize_t) -1);
      220. 	/*

libtiff/tif_write.c:564:1: Parameter `tif->tif_dir.td_imagedepth`
        562.  * that important information is not changed.
        563.  */
        564. int
             ^
        565. TIFFWriteCheck(TIFF* tif, int tiles, const char* module)
        566. {

libtiff/tif_write.c:611:48: Call
        609. 		}
        610. 	}
        611. 	if (tif->tif_dir.td_stripoffset_p == NULL && !TIFFSetupStrips(tif)) {
                                                            ^
        612. 		tif->tif_dir.td_nstrips = 0;
        613. 		TIFFErrorExt(tif->tif_clientdata, module, "No space for %s arrays",

libtiff/tif_write.c:522:1: Parameter `tif->tif_dir.td_imagedepth`
          520.     (TIFFFieldSet(tif,f) && (tif)->tif_dir.td_imagelength == 0)
          521. 
          522. int
               ^
          523. TIFFSetupStrips(TIFF* tif)
          524. {

libtiff/tif_write.c:530:29: Call
          528. 		td->td_stripsperimage =
          529. 		    isUnspecified(tif, FIELD_TILEDIMENSIONS) ?
          530. 			td->td_samplesperpixel : TIFFNumberOfTiles(tif);
                                           ^
          531. 	else
          532. 		td->td_stripsperimage =

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

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

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

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

libtiff/tif_tile.c:131: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` 
            129. 	    TIFFhowmany_32(td->td_imagelength, dy),
            130. 	    "TIFFNumberOfTiles"),
            131. 	    TIFFhowmany_32(td->td_imagedepth, dz), "TIFFNumberOfTiles");
                      ^
            132. 	if (td->td_planarconfig == PLANARCONFIG_SEPARATE)
            133. 		ntiles = _TIFFMultiply32(tif, ntiles, td->td_samplesperpixel,
