tools/tiff2pdf.c:5644: error: Buffer Overrun L3
  Offset: [7, +oo] (⇐ [0, +oo] + 7) Size: [0, +oo] by call to `t2p_readwrite_pdf_image`.

tools/tiff2pdf.c:5494:1: Parameter `t2p->tiff_maxdatasize`
5492. */
5493. 
5494. tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){
      ^
5495. 
5496. 	tsize_t written=0;

tools/tiff2pdf.c:5644:15: Call
5642. 				return (0);
5643. 			}
5644. 			written += t2p_readwrite_pdf_image(t2p, input, output);
                    ^
5645. 			t2p_write_advance_directory(t2p, output);
5646. 			if(t2p->t2p_error!=T2P_ERR_OK){return(0);}

tools/tiff2pdf.c:2233:1: Parameter `t2p->tiff_datasize`
  2231. */
  2232. 
  2233. tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
        ^
  2234. 
  2235. 	tsize_t written=0;

tools/tiff2pdf.c:2271:5: Call
  2269. 		if(t2p->pdf_compression == T2P_COMPRESS_G4){
  2270. 			buffer = (unsigned char*)
  2271. 				_TIFFmalloc(t2p->tiff_datasize);
            ^
  2272. 			if (buffer == NULL) {
  2273. 				TIFFError(TIFF2PDF_MODULE, 

libtiff/tif_unix.c:312:17: Assignment
    310. {
    311.         if (s == 0)
    312.                 return ((void *) NULL);
                         ^
    313. 
    314. 	return (malloc((size_t) s));

tools/tiff2pdf.c:2270:4: Assignment
  2268. #ifdef CCITT_SUPPORT
  2269. 		if(t2p->pdf_compression == T2P_COMPRESS_G4){
  2270. 			buffer = (unsigned char*)
           ^
  2271. 				_TIFFmalloc(t2p->tiff_datasize);
  2272. 			if (buffer == NULL) {

tools/tiff2pdf.c:2288:6: Call
  2286. 					 * bit-endianness fill order
  2287. 					 */
  2288. 					TIFFReverseBits(buffer,
             ^
  2289. 							t2p->tiff_datasize);
  2290. 			}

libtiff/tif_swab.c:283:1: <Length trace>
281. }
282. 
283. void
     ^
284. TIFFReverseBits(uint8* cp, tmsize_t n)  
285. {

libtiff/tif_swab.c:283:1: Parameter `*cp`
    281. }
    282. 
    283. void
         ^
    284. TIFFReverseBits(uint8* cp, tmsize_t n)  
    285. {

libtiff/tif_swab.c:294:3: Array access: Offset: [7, +oo] (⇐ [0, +oo] + 7) Size: [0, +oo] by call to `t2p_readwrite_pdf_image` 
    292. 		cp[5] = TIFFBitRevTable[cp[5]];
    293. 		cp[6] = TIFFBitRevTable[cp[6]];
    294. 		cp[7] = TIFFBitRevTable[cp[7]];
           ^
    295. 		cp += 8;
    296. 	}
