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

tools/tiff2pdf.c:2099:1: start of procedure t2p_read_tiff_size_tile()
2097. */
2098. 
2099. void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){
      ^
2100. 
2101. 	uint64* tbc = NULL;

tools/tiff2pdf.c:2101:2: 
2099. void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){
2100. 
2101. 	uint64* tbc = NULL;
       ^
2102. 	uint16 edge=0;
2103. #ifdef JPEG_SUPPORT

tools/tiff2pdf.c:2102:2: 
2100. 
2101. 	uint64* tbc = NULL;
2102. 	uint16 edge=0;
       ^
2103. #ifdef JPEG_SUPPORT
2104. 	unsigned char* jpt;

tools/tiff2pdf.c:2108:2: 
2106.         uint64 k;
2107. 
2108. 	edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
       ^
2109. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
2110. 	

tools/tiff2pdf.c:2173:1: start of procedure t2p_tile_is_right_edge()
  2171.  */
  2172. 
  2173. int t2p_tile_is_right_edge(T2P_TILES tiles, ttile_t tile){
        ^
  2174. 
  2175. 	if( ((tile+1) % tiles.tiles_tilecountx == 0) 

tools/tiff2pdf.c:2175:7: Taking false branch
  2173. int t2p_tile_is_right_edge(T2P_TILES tiles, ttile_t tile){
  2174. 
  2175. 	if( ((tile+1) % tiles.tiles_tilecountx == 0) 
              ^
  2176. 		&& (tiles.tiles_edgetilewidth != 0) ){
  2177. 		return(1);

tools/tiff2pdf.c:2179:3: 
  2177. 		return(1);
  2178. 	} else {
  2179. 		return(0);
          ^
  2180. 	}
  2181. }

tools/tiff2pdf.c:2181:1: return from a call to t2p_tile_is_right_edge
  2179. 		return(0);
  2180. 	}
  2181. }
        ^
  2182. 
  2183. /*

tools/tiff2pdf.c:2109:2: 
2107. 
2108. 	edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
2109. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
       ^
2110. 	
2111. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){

tools/tiff2pdf.c:2188:1: start of procedure t2p_tile_is_bottom_edge()
  2186.  */
  2187. 
  2188. int t2p_tile_is_bottom_edge(T2P_TILES tiles, ttile_t tile){
        ^
  2189. 
  2190. 	if( ((tile+1) > (tiles.tiles_tilecount-tiles.tiles_tilecountx) )

tools/tiff2pdf.c:2190:7: Taking false branch
  2188. int t2p_tile_is_bottom_edge(T2P_TILES tiles, ttile_t tile){
  2189. 
  2190. 	if( ((tile+1) > (tiles.tiles_tilecount-tiles.tiles_tilecountx) )
              ^
  2191. 		&& (tiles.tiles_edgetilelength != 0) ){
  2192. 		return(1);

tools/tiff2pdf.c:2194:3: 
  2192. 		return(1);
  2193. 	} else {
  2194. 		return(0);
          ^
  2195. 	}
  2196. }

tools/tiff2pdf.c:2196:1: return from a call to t2p_tile_is_bottom_edge
  2194. 		return(0);
  2195. 	}
  2196. }
        ^
  2197. 
  2198. /*

tools/tiff2pdf.c:2111:5: Taking true branch
2109. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
2110. 	
2111. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){
          ^
2112. 		if(edge
2113. #if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT)

tools/tiff2pdf.c:2112:6: Taking false branch
2110. 	
2111. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){
2112. 		if(edge
           ^
2113. #if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT)
2114. 		&& !(t2p->pdf_compression==T2P_COMPRESS_JPEG)

tools/tiff2pdf.c:2124:4: 
2122. 			return;
2123. 		} else {
2124. 			TIFFGetField(input, TIFFTAG_TILEBYTECOUNTS, &tbc);
         ^
2125. 			k=tbc[tile];
2126. #ifdef OJPEG_SUPPORT

libtiff/tif_dir.c:1269:1: start of procedure TIFFGetField()
  1267.  * internal directory structure.
  1268.  */
  1269. int
        ^
  1270. TIFFGetField(TIFF* tif, uint32 tag, ...)
  1271. {

libtiff/tif_dir.c:1275:2: 
  1273. 	va_list ap;
  1274. 
  1275. 	va_start(ap, tag);
         ^
  1276. 	status = TIFFVGetField(tif, tag, ap);
  1277. 	va_end(ap);

libtiff/tif_dir.c:1276:2: Skipping TIFFVGetField(): empty list of specs
  1274. 
  1275. 	va_start(ap, tag);
  1276. 	status = TIFFVGetField(tif, tag, ap);
         ^
  1277. 	va_end(ap);
  1278. 	return (status);

libtiff/tif_dir.c:1277:2: 
  1275. 	va_start(ap, tag);
  1276. 	status = TIFFVGetField(tif, tag, ap);
  1277. 	va_end(ap);
         ^
  1278. 	return (status);
  1279. }

libtiff/tif_dir.c:1278:2: 
  1276. 	status = TIFFVGetField(tif, tag, ap);
  1277. 	va_end(ap);
  1278. 	return (status);
         ^
  1279. }
  1280. 

libtiff/tif_dir.c:1279:1: return from a call to TIFFGetField
  1277. 	va_end(ap);
  1278. 	return (status);
  1279. }
        ^
  1280. 
  1281. /*

tools/tiff2pdf.c:2125:4: 
2123. 		} else {
2124. 			TIFFGetField(input, TIFFTAG_TILEBYTECOUNTS, &tbc);
2125. 			k=tbc[tile];
         ^
2126. #ifdef OJPEG_SUPPORT
2127. 			if(t2p->tiff_compression==COMPRESSION_OJPEG){
