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

tools/tiffcrop.c:6891:1: Parameter `(*out)->tif_dir.td_imagewidth`
6889.   } /* end extractImageSection */
6890. 
6891. static int 
      ^
6892. writeSelections(TIFF *in, TIFF **out, struct crop_mask *crop, 
6893.                 struct image_data *image, struct dump_opts *dump,

tools/tiffcrop.c:6977:16: Call
6975.          for (i = 0; i < crop->selections; i++)
6976.            {
6977.            if (update_output_file (out, mp, autoindex, filename, page))
                     ^
6978.              return (1);
6979. 

tools/tiffcrop.c:2106:1: Parameter `(*tiffout)->tif_dir.td_imagewidth`
  2104.  * so TIFFTAG PAGENUM will be correct in image.
  2105.  */
  2106. static int
        ^
  2107. update_output_file (TIFF **tiffout, char *mode, int autoindex,
  2108.                     char *outname, unsigned int *page)

tools/tiffcrop.c:6982:16: Call
6980.            crop_buff = seg_buffs[i].buffer;
6981.            /* Write the current region to the current file */
6982.            if (writeCroppedImage(in, *out, image, dump,
                     ^
6983.                                  crop->regionlist[i].width, 
6984.                                  crop->regionlist[i].length, 

tools/tiffcrop.c:7734:1: Parameter `out->tif_dir.td_imagewidth`
  7732.  * then passed in as an argument.
  7733.  */
  7734. static int  
        ^
  7735. writeCroppedImage(TIFF *in, TIFF *out, struct image_data *image, 
  7736.                   struct dump_opts *dump, uint32 width, uint32 length, 

tools/tiffcrop.c:7978:11: Call
  7976.     if (config == PLANARCONFIG_CONTIG)
  7977.       {
  7978.       if (writeBufferToContigTiles (out, crop_buff, length, width, spp, dump))
                  ^
  7979.         TIFFError("","Unable to write contiguous tile data for page %d", pagenum);
  7980.       }

tools/tiffcrop.c:1227:1: Parameter `out->tif_dir.td_imagewidth`
    1225.  * to be written out as a tile.
    1226.  */
    1227. static int writeBufferToContigTiles (TIFF* out, uint8* buf, uint32 imagelength,
          ^
    1228. 				       uint32 imagewidth, tsample_t spp, 
    1229.                                        struct dump_opts* dump)

tools/tiffcrop.c:1304:11: Call
    1302.         }
    1303. 
    1304.       if (TIFFWriteTile(out, tilebuf, col, row, 0, 0) < 0)
                    ^
    1305.         {
    1306. 	TIFFError("writeBufferToContigTiles",

libtiff/tif_write.c:363:1: Parameter `tif->tif_dir.td_imagewidth`
      361.  * tile is selected by the (x,y,z,s) coordinates.
      362.  */
      363. tmsize_t
           ^
      364. TIFFWriteTile(TIFF* tif, void* buf, uint32 x, uint32 y, uint32 z, uint16 s)
      365. {

libtiff/tif_write.c:366:7: Call
      364. TIFFWriteTile(TIFF* tif, void* buf, uint32 x, uint32 y, uint32 z, uint16 s)
      365. {
      366. 	if (!TIFFCheckTile(tif, x, y, z, s))
                 ^
      367. 		return ((tmsize_t)(-1));
      368. 	/*

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

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

libtiff/tif_tile.c:78:3: Binary operation: ([0, +oo] - 1):unsigned32 by call to `writeCroppedImage` 
        76. 
        77. 	if (x >= td->td_imagewidth) {
        78. 		TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
              ^
        79. 			     "%lu: Col out of range, max %lu",
        80. 			     (unsigned long) x,
