tools/tiff2pdf.c:5677: error: Buffer Overrun S2
  Offset: [`t2p->pdf_ojpegdatalength`, +oo] Size: [0, +oo] by call to `t2p_readwrite_pdf_image_tile`.

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

tools/tiff2pdf.c:5677:16: Call
5675. 				streamlen=written;
5676. 				t2p_read_tiff_size_tile(t2p, input, i2);
5677. 				written += t2p_readwrite_pdf_image_tile(t2p, input, output, i2);
                     ^
5678. 				t2p_write_advance_directory(t2p, output);
5679. 				if(t2p->t2p_error!=T2P_ERR_OK){return(0);}

tools/tiff2pdf.c:2862:1: <Offset trace>
2860.  */
2861. 
2862. tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_t tile){
      ^
2863. 
2864. 	uint16 edge=0;

tools/tiff2pdf.c:2862:1: Parameter `t2p->pdf_ojpegdatalength`
  2860.  */
  2861. 
  2862. tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_t tile){
        ^
  2863. 
  2864. 	uint16 edge=0;

tools/tiff2pdf.c:2988:4: Assignment
  2986. 				}
  2987. 			}
  2988. 			bufferoffset = t2p->pdf_ojpegdatalength;
           ^
  2989. 			retTIFFReadRawTile = TIFFReadRawTile(input,
  2990. 					tile, 

tools/tiff2pdf.c:2999:4: Assignment
  2997. 				return(0);
  2998. 			}
  2999. 			bufferoffset += retTIFFReadRawTile;
           ^
  3000. 			((unsigned char*)buffer)[bufferoffset++]=0xff;
  3001. 			((unsigned char*)buffer)[bufferoffset++]=0xd9;

tools/tiff2pdf.c:2862:1: <Length trace>
2860.  */
2861. 
2862. tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_t tile){
      ^
2863. 
2864. 	uint16 edge=0;

tools/tiff2pdf.c:2862:1: Parameter `t2p->tiff_datasize`
  2860.  */
  2861. 
  2862. tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_t tile){
        ^
  2863. 
  2864. 	uint16 edge=0;

tools/tiff2pdf.c:2962:28: Call
  2960. 				return(0);
  2961. 			}
  2962. 			buffer=(unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
                                   ^
  2963. 			if(buffer==NULL){
  2964. 				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:2962:4: Assignment
  2960. 				return(0);
  2961. 			}
  2962. 			buffer=(unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
           ^
  2963. 			if(buffer==NULL){
  2964. 				TIFFError(TIFF2PDF_MODULE, 

tools/tiff2pdf.c:3000:4: Array access: Offset: [t2p->pdf_ojpegdatalength, +oo] Size: [0, +oo] by call to `t2p_readwrite_pdf_image_tile` 
  2998. 			}
  2999. 			bufferoffset += retTIFFReadRawTile;
  3000. 			((unsigned char*)buffer)[bufferoffset++]=0xff;
           ^
  3001. 			((unsigned char*)buffer)[bufferoffset++]=0xd9;
  3002. 			t2pWriteFile(output, (tdata_t) buffer, bufferoffset);
