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

tools/tiff2pdf.c:5557:1: Parameter `t2p->tiff_maxdatasize`
5555. */
5556. 
5557. tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){
      ^
5558. 
5559. 	tsize_t written=0;

tools/tiff2pdf.c:5707:15: Call
5705. 				return (0);
5706. 			}
5707. 			written += t2p_readwrite_pdf_image(t2p, input, output);
                    ^
5708. 			t2p_write_advance_directory(t2p, output);
5709. 			if(t2p->t2p_error!=T2P_ERR_OK){return(0);}

tools/tiff2pdf.c:2237:1: Parameter `t2p->tiff_datasize`
  2235. */
  2236. 
  2237. tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
        ^
  2238. 
  2239. 	tsize_t written=0;

tools/tiff2pdf.c:2275:5: Call
  2273. 		if(t2p->pdf_compression == T2P_COMPRESS_G4){
  2274. 			buffer = (unsigned char*)
  2275. 				_TIFFmalloc(t2p->tiff_datasize);
            ^
  2276. 			if (buffer == NULL) {
  2277. 				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:2274:4: Assignment
  2272. #ifdef CCITT_SUPPORT
  2273. 		if(t2p->pdf_compression == T2P_COMPRESS_G4){
  2274. 			buffer = (unsigned char*)
           ^
  2275. 				_TIFFmalloc(t2p->tiff_datasize);
  2276. 			if (buffer == NULL) {

tools/tiff2pdf.c:2298:6: Call
  2296. 					 * bit-endianness fill order
  2297. 					 */
  2298. 					TIFFReverseBits(buffer,
             ^
  2299. 							t2p->tiff_datasize);
  2300. 			}

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. 	}
