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

tools/tiff2pdf.c:1995:1: start of procedure t2p_read_tiff_size_tile()
1993. */
1994. 
1995. void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){
      ^
1996. 
1997. 	uint64* tbc = NULL;

tools/tiff2pdf.c:1997:2: 
1995. void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){
1996. 
1997. 	uint64* tbc = NULL;
       ^
1998. 	uint16 edge=0;
1999. #ifdef JPEG_SUPPORT

tools/tiff2pdf.c:1998:2: 
1996. 
1997. 	uint64* tbc = NULL;
1998. 	uint16 edge=0;
       ^
1999. #ifdef JPEG_SUPPORT
2000. 	unsigned char* jpt;

tools/tiff2pdf.c:2004:2: 
2002.         uint64 k;
2003. 
2004. 	edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
       ^
2005. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
2006. 	

tools/tiff2pdf.c:2069:1: start of procedure t2p_tile_is_right_edge()
  2067.  */
  2068. 
  2069. int t2p_tile_is_right_edge(T2P_TILES tiles, ttile_t tile){
        ^
  2070. 
  2071. 	if( ((tile+1) % tiles.tiles_tilecountx == 0) 

tools/tiff2pdf.c:2071:7: Taking false branch
  2069. int t2p_tile_is_right_edge(T2P_TILES tiles, ttile_t tile){
  2070. 
  2071. 	if( ((tile+1) % tiles.tiles_tilecountx == 0) 
              ^
  2072. 		&& (tiles.tiles_edgetilewidth != 0) ){
  2073. 		return(1);

tools/tiff2pdf.c:2075:3: 
  2073. 		return(1);
  2074. 	} else {
  2075. 		return(0);
          ^
  2076. 	}
  2077. }

tools/tiff2pdf.c:2077:1: return from a call to t2p_tile_is_right_edge
  2075. 		return(0);
  2076. 	}
  2077. }
        ^
  2078. 
  2079. /*

tools/tiff2pdf.c:2005:2: 
2003. 
2004. 	edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
2005. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
       ^
2006. 	
2007. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){

tools/tiff2pdf.c:2084:1: start of procedure t2p_tile_is_bottom_edge()
  2082.  */
  2083. 
  2084. int t2p_tile_is_bottom_edge(T2P_TILES tiles, ttile_t tile){
        ^
  2085. 
  2086. 	if( ((tile+1) > (tiles.tiles_tilecount-tiles.tiles_tilecountx) )

tools/tiff2pdf.c:2086:7: Taking false branch
  2084. int t2p_tile_is_bottom_edge(T2P_TILES tiles, ttile_t tile){
  2085. 
  2086. 	if( ((tile+1) > (tiles.tiles_tilecount-tiles.tiles_tilecountx) )
              ^
  2087. 		&& (tiles.tiles_edgetilelength != 0) ){
  2088. 		return(1);

tools/tiff2pdf.c:2090:3: 
  2088. 		return(1);
  2089. 	} else {
  2090. 		return(0);
          ^
  2091. 	}
  2092. }

tools/tiff2pdf.c:2092:1: return from a call to t2p_tile_is_bottom_edge
  2090. 		return(0);
  2091. 	}
  2092. }
        ^
  2093. 
  2094. /*

tools/tiff2pdf.c:2007:5: Taking true branch
2005. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
2006. 	
2007. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){
          ^
2008. 		if(edge
2009. #if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT)

tools/tiff2pdf.c:2008:6: Taking false branch
2006. 	
2007. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){
2008. 		if(edge
           ^
2009. #if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT)
2010. 		&& !(t2p->pdf_compression==T2P_COMPRESS_JPEG)

tools/tiff2pdf.c:2020:4: 
2018. 			return;
2019. 		} else {
2020. 			TIFFGetField(input, TIFFTAG_TILEBYTECOUNTS, &tbc);
         ^
2021. 			k=tbc[tile];
2022. #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:2021:4: 
2019. 		} else {
2020. 			TIFFGetField(input, TIFFTAG_TILEBYTECOUNTS, &tbc);
2021. 			k=tbc[tile];
         ^
2022. #ifdef OJPEG_SUPPORT
2023. 			if(t2p->tiff_compression==COMPRESSION_OJPEG){
