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

tools/tiff2pdf.c:2075:1: start of procedure t2p_read_tiff_size_tile()
2073. */
2074. 
2075. void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){
      ^
2076. 
2077. 	uint64* tbc = NULL;

tools/tiff2pdf.c:2077:2: 
2075. void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){
2076. 
2077. 	uint64* tbc = NULL;
       ^
2078. 	uint16 edge=0;
2079. #ifdef JPEG_SUPPORT

tools/tiff2pdf.c:2078:2: 
2076. 
2077. 	uint64* tbc = NULL;
2078. 	uint16 edge=0;
       ^
2079. #ifdef JPEG_SUPPORT
2080. 	unsigned char* jpt;

tools/tiff2pdf.c:2084:2: 
2082.         uint64 k;
2083. 
2084. 	edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
       ^
2085. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
2086. 	

tools/tiff2pdf.c:2149:1: start of procedure t2p_tile_is_right_edge()
  2147.  */
  2148. 
  2149. int t2p_tile_is_right_edge(T2P_TILES tiles, ttile_t tile){
        ^
  2150. 
  2151. 	if( ((tile+1) % tiles.tiles_tilecountx == 0) 

tools/tiff2pdf.c:2151:7: Taking false branch
  2149. int t2p_tile_is_right_edge(T2P_TILES tiles, ttile_t tile){
  2150. 
  2151. 	if( ((tile+1) % tiles.tiles_tilecountx == 0) 
              ^
  2152. 		&& (tiles.tiles_edgetilewidth != 0) ){
  2153. 		return(1);

tools/tiff2pdf.c:2155:3: 
  2153. 		return(1);
  2154. 	} else {
  2155. 		return(0);
          ^
  2156. 	}
  2157. }

tools/tiff2pdf.c:2157:1: return from a call to t2p_tile_is_right_edge
  2155. 		return(0);
  2156. 	}
  2157. }
        ^
  2158. 
  2159. /*

tools/tiff2pdf.c:2085:2: 
2083. 
2084. 	edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
2085. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
       ^
2086. 	
2087. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){

tools/tiff2pdf.c:2164:1: start of procedure t2p_tile_is_bottom_edge()
  2162.  */
  2163. 
  2164. int t2p_tile_is_bottom_edge(T2P_TILES tiles, ttile_t tile){
        ^
  2165. 
  2166. 	if( ((tile+1) > (tiles.tiles_tilecount-tiles.tiles_tilecountx) )

tools/tiff2pdf.c:2166:7: Taking false branch
  2164. int t2p_tile_is_bottom_edge(T2P_TILES tiles, ttile_t tile){
  2165. 
  2166. 	if( ((tile+1) > (tiles.tiles_tilecount-tiles.tiles_tilecountx) )
              ^
  2167. 		&& (tiles.tiles_edgetilelength != 0) ){
  2168. 		return(1);

tools/tiff2pdf.c:2170:3: 
  2168. 		return(1);
  2169. 	} else {
  2170. 		return(0);
          ^
  2171. 	}
  2172. }

tools/tiff2pdf.c:2172:1: return from a call to t2p_tile_is_bottom_edge
  2170. 		return(0);
  2171. 	}
  2172. }
        ^
  2173. 
  2174. /*

tools/tiff2pdf.c:2087:5: Taking true branch
2085. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
2086. 	
2087. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){
          ^
2088. 		if(edge
2089. #if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT)

tools/tiff2pdf.c:2088:6: Taking false branch
2086. 	
2087. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){
2088. 		if(edge
           ^
2089. #if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT)
2090. 		&& !(t2p->pdf_compression==T2P_COMPRESS_JPEG)

tools/tiff2pdf.c:2100:4: 
2098. 			return;
2099. 		} else {
2100. 			TIFFGetField(input, TIFFTAG_TILEBYTECOUNTS, &tbc);
         ^
2101. 			k=tbc[tile];
2102. #ifdef OJPEG_SUPPORT

libtiff/tif_dir.c:1214:1: start of procedure TIFFGetField()
  1212.  * internal directory structure.
  1213.  */
  1214. int
        ^
  1215. TIFFGetField(TIFF* tif, uint32 tag, ...)
  1216. {

libtiff/tif_dir.c:1220:2: 
  1218. 	va_list ap;
  1219. 
  1220. 	va_start(ap, tag);
         ^
  1221. 	status = TIFFVGetField(tif, tag, ap);
  1222. 	va_end(ap);

libtiff/tif_dir.c:1221:2: Skipping TIFFVGetField(): empty list of specs
  1219. 
  1220. 	va_start(ap, tag);
  1221. 	status = TIFFVGetField(tif, tag, ap);
         ^
  1222. 	va_end(ap);
  1223. 	return (status);

libtiff/tif_dir.c:1222:2: 
  1220. 	va_start(ap, tag);
  1221. 	status = TIFFVGetField(tif, tag, ap);
  1222. 	va_end(ap);
         ^
  1223. 	return (status);
  1224. }

libtiff/tif_dir.c:1223:2: 
  1221. 	status = TIFFVGetField(tif, tag, ap);
  1222. 	va_end(ap);
  1223. 	return (status);
         ^
  1224. }
  1225. 

libtiff/tif_dir.c:1224:1: return from a call to TIFFGetField
  1222. 	va_end(ap);
  1223. 	return (status);
  1224. }
        ^
  1225. 
  1226. /*

tools/tiff2pdf.c:2101:4: 
2099. 		} else {
2100. 			TIFFGetField(input, TIFFTAG_TILEBYTECOUNTS, &tbc);
2101. 			k=tbc[tile];
         ^
2102. #ifdef OJPEG_SUPPORT
2103. 			if(t2p->tiff_compression==COMPRESSION_OJPEG){
