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

tools/tiff2pdf.c:2042:1: start of procedure t2p_read_tiff_size_tile()
2040. */
2041. 
2042. void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){
      ^
2043. 
2044. 	uint64* tbc = NULL;

tools/tiff2pdf.c:2044:2: 
2042. void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){
2043. 
2044. 	uint64* tbc = NULL;
       ^
2045. 	uint16 edge=0;
2046. #ifdef JPEG_SUPPORT

tools/tiff2pdf.c:2045:2: 
2043. 
2044. 	uint64* tbc = NULL;
2045. 	uint16 edge=0;
       ^
2046. #ifdef JPEG_SUPPORT
2047. 	unsigned char* jpt;

tools/tiff2pdf.c:2051:2: 
2049.         uint64 k;
2050. 
2051. 	edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
       ^
2052. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
2053. 	

tools/tiff2pdf.c:2116:1: start of procedure t2p_tile_is_right_edge()
  2114.  */
  2115. 
  2116. int t2p_tile_is_right_edge(T2P_TILES tiles, ttile_t tile){
        ^
  2117. 
  2118. 	if( ((tile+1) % tiles.tiles_tilecountx == 0) 

tools/tiff2pdf.c:2118:7: Taking false branch
  2116. int t2p_tile_is_right_edge(T2P_TILES tiles, ttile_t tile){
  2117. 
  2118. 	if( ((tile+1) % tiles.tiles_tilecountx == 0) 
              ^
  2119. 		&& (tiles.tiles_edgetilewidth != 0) ){
  2120. 		return(1);

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

tools/tiff2pdf.c:2124:1: return from a call to t2p_tile_is_right_edge
  2122. 		return(0);
  2123. 	}
  2124. }
        ^
  2125. 
  2126. /*

tools/tiff2pdf.c:2052:2: 
2050. 
2051. 	edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
2052. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
       ^
2053. 	
2054. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){

tools/tiff2pdf.c:2131:1: start of procedure t2p_tile_is_bottom_edge()
  2129.  */
  2130. 
  2131. int t2p_tile_is_bottom_edge(T2P_TILES tiles, ttile_t tile){
        ^
  2132. 
  2133. 	if( ((tile+1) > (tiles.tiles_tilecount-tiles.tiles_tilecountx) )

tools/tiff2pdf.c:2133:7: Taking false branch
  2131. int t2p_tile_is_bottom_edge(T2P_TILES tiles, ttile_t tile){
  2132. 
  2133. 	if( ((tile+1) > (tiles.tiles_tilecount-tiles.tiles_tilecountx) )
              ^
  2134. 		&& (tiles.tiles_edgetilelength != 0) ){
  2135. 		return(1);

tools/tiff2pdf.c:2137:3: 
  2135. 		return(1);
  2136. 	} else {
  2137. 		return(0);
          ^
  2138. 	}
  2139. }

tools/tiff2pdf.c:2139:1: return from a call to t2p_tile_is_bottom_edge
  2137. 		return(0);
  2138. 	}
  2139. }
        ^
  2140. 
  2141. /*

tools/tiff2pdf.c:2054:5: Taking true branch
2052. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
2053. 	
2054. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){
          ^
2055. 		if(edge
2056. #if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT)

tools/tiff2pdf.c:2055:6: Taking false branch
2053. 	
2054. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){
2055. 		if(edge
           ^
2056. #if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT)
2057. 		&& !(t2p->pdf_compression==T2P_COMPRESS_JPEG)

tools/tiff2pdf.c:2067:4: 
2065. 			return;
2066. 		} else {
2067. 			TIFFGetField(input, TIFFTAG_TILEBYTECOUNTS, &tbc);
         ^
2068. 			k=tbc[tile];
2069. #ifdef OJPEG_SUPPORT

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

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

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

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

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

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

tools/tiff2pdf.c:2068:4: 
2066. 		} else {
2067. 			TIFFGetField(input, TIFFTAG_TILEBYTECOUNTS, &tbc);
2068. 			k=tbc[tile];
         ^
2069. #ifdef OJPEG_SUPPORT
2070. 			if(t2p->tiff_compression==COMPRESSION_OJPEG){
