tools/tiff2pdf.c:5623: error: Integer Overflow L2
  ([min(1, `output->tif_dir.td_imagedepth`), 4294967294] + [0, 4294967294-min(1, `output->tif_dir.td_imagedepth`)]):unsigned32 by call to `t2p_readwrite_pdf_image`.

tools/tiff2pdf.c:5480:1: Parameter `output->tif_dir.td_imagedepth`
5478. */
5479. 
5480. tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){
      ^
5481. 
5482. 	tsize_t written=0;

tools/tiff2pdf.c:5623:15: Call
5621. 			streamlen=written;
5622. 			t2p_read_tiff_size(t2p, input);
5623. 			written += t2p_readwrite_pdf_image(t2p, input, output);
                    ^
5624. 			t2p_write_advance_directory(t2p, output);
5625. 			if(t2p->t2p_error!=T2P_ERR_OK){return(0);}

tools/tiff2pdf.c:2215:1: Parameter `output->tif_dir.td_imagedepth`
  2213. */
  2214. 
  2215. tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
        ^
  2216. 
  2217. 	tsize_t written=0;

tools/tiff2pdf.c:2780:18: Call
  2778. 	if(t2p->pdf_compression == T2P_COMPRESS_JPEG
  2779. 	   && t2p->tiff_photometric == PHOTOMETRIC_YCBCR){
  2780. 		bufferoffset = TIFFWriteEncodedStrip(output, (tstrip_t)0,
                         ^
  2781. 						     buffer,
  2782. 						     stripsize * stripcount); 

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:640:13: Call
      638.             !(tif->tif_flags & TIFF_DIRTYDIRECT)  )
      639.         {
      640.             TIFFForceStrileArrayWriting(tif);
                       ^
      641.         }
      642. 

libtiff/tif_flush.c:78:1: Parameter `tif->tif_dir.td_imagedepth`
        76.  * Returns 1 in case of success, 0 otherwise.
        77.  */
        78. int TIFFForceStrileArrayWriting(TIFF* tif)
            ^
        79. {
        80.     static const char module[] = "TIFFForceStrileArrayWriting";

libtiff/tif_flush.c:120:55: Call
        118.         }
        119. 
        120.         if (tif->tif_dir.td_stripoffset_p == NULL && !TIFFSetupStrips(tif))
                                                                   ^
        121.             return 0;
        122.     }

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, output->tif_dir.td_imagedepth), 4294967294] + [0, 4294967294-min(1, output->tif_dir.td_imagedepth)]):unsigned32 by call to `t2p_readwrite_pdf_image` 
            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,
