tools/tiff2pdf.c:2055: error: Null Dereference
  pointer `tbc` last assigned on line 2031 could be null and is dereferenced at line 2055, column 6.

tools/tiff2pdf.c:2029:1: start of procedure t2p_read_tiff_size_tile()
2027. */
2028. 
2029. void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){
      ^
2030. 
2031. 	uint64* tbc = NULL;

tools/tiff2pdf.c:2031:2: 
2029. void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){
2030. 
2031. 	uint64* tbc = NULL;
       ^
2032. 	uint16 edge=0;
2033. #ifdef JPEG_SUPPORT

tools/tiff2pdf.c:2032:2: 
2030. 
2031. 	uint64* tbc = NULL;
2032. 	uint16 edge=0;
       ^
2033. #ifdef JPEG_SUPPORT
2034. 	unsigned char* jpt;

tools/tiff2pdf.c:2038:2: 
2036.         uint64 k;
2037. 
2038. 	edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
       ^
2039. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
2040. 	

tools/tiff2pdf.c:2103:1: start of procedure t2p_tile_is_right_edge()
  2101.  */
  2102. 
  2103. int t2p_tile_is_right_edge(T2P_TILES tiles, ttile_t tile){
        ^
  2104. 
  2105. 	if( ((tile+1) % tiles.tiles_tilecountx == 0) 

tools/tiff2pdf.c:2105:7: Taking false branch
  2103. int t2p_tile_is_right_edge(T2P_TILES tiles, ttile_t tile){
  2104. 
  2105. 	if( ((tile+1) % tiles.tiles_tilecountx == 0) 
              ^
  2106. 		&& (tiles.tiles_edgetilewidth != 0) ){
  2107. 		return(1);

tools/tiff2pdf.c:2109:3: 
  2107. 		return(1);
  2108. 	} else {
  2109. 		return(0);
          ^
  2110. 	}
  2111. }

tools/tiff2pdf.c:2111:1: return from a call to t2p_tile_is_right_edge
  2109. 		return(0);
  2110. 	}
  2111. }
        ^
  2112. 
  2113. /*

tools/tiff2pdf.c:2039:2: 
2037. 
2038. 	edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
2039. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
       ^
2040. 	
2041. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){

tools/tiff2pdf.c:2118:1: start of procedure t2p_tile_is_bottom_edge()
  2116.  */
  2117. 
  2118. int t2p_tile_is_bottom_edge(T2P_TILES tiles, ttile_t tile){
        ^
  2119. 
  2120. 	if( ((tile+1) > (tiles.tiles_tilecount-tiles.tiles_tilecountx) )

tools/tiff2pdf.c:2120:7: Taking false branch
  2118. int t2p_tile_is_bottom_edge(T2P_TILES tiles, ttile_t tile){
  2119. 
  2120. 	if( ((tile+1) > (tiles.tiles_tilecount-tiles.tiles_tilecountx) )
              ^
  2121. 		&& (tiles.tiles_edgetilelength != 0) ){
  2122. 		return(1);

tools/tiff2pdf.c:2124:3: 
  2122. 		return(1);
  2123. 	} else {
  2124. 		return(0);
          ^
  2125. 	}
  2126. }

tools/tiff2pdf.c:2126:1: return from a call to t2p_tile_is_bottom_edge
  2124. 		return(0);
  2125. 	}
  2126. }
        ^
  2127. 
  2128. /*

tools/tiff2pdf.c:2041:5: Taking true branch
2039. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
2040. 	
2041. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){
          ^
2042. 		if(edge
2043. #if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT)

tools/tiff2pdf.c:2042:6: Taking false branch
2040. 	
2041. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){
2042. 		if(edge
           ^
2043. #if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT)
2044. 		&& !(t2p->pdf_compression==T2P_COMPRESS_JPEG)

tools/tiff2pdf.c:2054:4: 
2052. 			return;
2053. 		} else {
2054. 			TIFFGetField(input, TIFFTAG_TILEBYTECOUNTS, &tbc);
         ^
2055. 			k=tbc[tile];
2056. #ifdef OJPEG_SUPPORT

libtiff/tif_dir.c:1151:1: start of procedure TIFFGetField()
  1149.  * internal directory structure.
  1150.  */
  1151. int
        ^
  1152. TIFFGetField(TIFF* tif, uint32 tag, ...)
  1153. {

libtiff/tif_dir.c:1157:2: 
  1155. 	va_list ap;
  1156. 
  1157. 	va_start(ap, tag);
         ^
  1158. 	status = TIFFVGetField(tif, tag, ap);
  1159. 	va_end(ap);

libtiff/tif_dir.c:1158:2: Skipping TIFFVGetField(): empty list of specs
  1156. 
  1157. 	va_start(ap, tag);
  1158. 	status = TIFFVGetField(tif, tag, ap);
         ^
  1159. 	va_end(ap);
  1160. 	return (status);

libtiff/tif_dir.c:1159:2: 
  1157. 	va_start(ap, tag);
  1158. 	status = TIFFVGetField(tif, tag, ap);
  1159. 	va_end(ap);
         ^
  1160. 	return (status);
  1161. }

libtiff/tif_dir.c:1160:2: 
  1158. 	status = TIFFVGetField(tif, tag, ap);
  1159. 	va_end(ap);
  1160. 	return (status);
         ^
  1161. }
  1162. 

libtiff/tif_dir.c:1161:1: return from a call to TIFFGetField
  1159. 	va_end(ap);
  1160. 	return (status);
  1161. }
        ^
  1162. 
  1163. /*

tools/tiff2pdf.c:2055:4: 
2053. 		} else {
2054. 			TIFFGetField(input, TIFFTAG_TILEBYTECOUNTS, &tbc);
2055. 			k=tbc[tile];
         ^
2056. #ifdef OJPEG_SUPPORT
2057. 			if(t2p->tiff_compression==COMPRESSION_OJPEG){
