tools/tiff2pdf.c:1077: error: Buffer Overrun S2
  Offset: `t2p->tiff_pagecount` Size: [0, +oo].

tools/tiff2pdf.c:1029:1: <Offset trace>
1027. */
1028. 
1029. void t2p_read_tiff_init(T2P* t2p, TIFF* input){
      ^
1030. 
1031. 	tdir_t directorycount=0;

tools/tiff2pdf.c:1029:1: Parameter `t2p->tiff_pagecount`
1027. */
1028. 
1029. void t2p_read_tiff_init(T2P* t2p, TIFF* input){
      ^
1030. 
1031. 	tdir_t directorycount=0;

tools/tiff2pdf.c:1037:17: <Length trace>
1035. 	uint16 xuint16=0;
1036. 
1037. 	directorycount=TIFFNumberOfDirectories(input);
                      ^
1038. 	t2p->tiff_pages = (T2P_PAGE*) _TIFFmalloc(directorycount * sizeof(T2P_PAGE));
1039. 	if(t2p->tiff_pages==NULL){

tools/tiff2pdf.c:1037:17: Call
1035. 	uint16 xuint16=0;
1036. 
1037. 	directorycount=TIFFNumberOfDirectories(input);
                      ^
1038. 	t2p->tiff_pages = (T2P_PAGE*) _TIFFmalloc(directorycount * sizeof(T2P_PAGE));
1039. 	if(t2p->tiff_pages==NULL){

libtiff/tif_dir.c:1479:2: Assignment
  1477. 	else
  1478. 		nextdir = tif->tif_header.big.tiff_diroff;
  1479. 	n = 0;
         ^
  1480. 	while (nextdir != 0 && TIFFAdvanceDirectory(tif, &nextdir, NULL))
  1481. 		n++;

libtiff/tif_dir.c:1482:2: Assignment
  1480. 	while (nextdir != 0 && TIFFAdvanceDirectory(tif, &nextdir, NULL))
  1481. 		n++;
  1482. 	return (n);
         ^
  1483. }
  1484. 

tools/tiff2pdf.c:1037:2: Assignment
1035. 	uint16 xuint16=0;
1036. 
1037. 	directorycount=TIFFNumberOfDirectories(input);
       ^
1038. 	t2p->tiff_pages = (T2P_PAGE*) _TIFFmalloc(directorycount * sizeof(T2P_PAGE));
1039. 	if(t2p->tiff_pages==NULL){

tools/tiff2pdf.c:1038:32: Call
1036. 
1037. 	directorycount=TIFFNumberOfDirectories(input);
1038. 	t2p->tiff_pages = (T2P_PAGE*) _TIFFmalloc(directorycount * sizeof(T2P_PAGE));
                                     ^
1039. 	if(t2p->tiff_pages==NULL){
1040. 		TIFFError(

libtiff/tif_unix.c:261:17: Assignment
  259. {
  260.         if (s == 0)
  261.                 return ((void *) NULL);
                       ^
  262. 
  263. 	return (malloc((size_t) s));

tools/tiff2pdf.c:1038:2: Assignment
1036. 
1037. 	directorycount=TIFFNumberOfDirectories(input);
1038. 	t2p->tiff_pages = (T2P_PAGE*) _TIFFmalloc(directorycount * sizeof(T2P_PAGE));
       ^
1039. 	if(t2p->tiff_pages==NULL){
1040. 		TIFFError(

tools/tiff2pdf.c:1077:5: Array access: Offset: t2p->tiff_pagecount Size: [0, +oo]
1075. 					paged;
1076. 			} else {
1077. 				t2p->tiff_pages[t2p->tiff_pagecount].page_number = 
          ^
1078. 					pagen;
1079. 			}
