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

tools/tiff2pdf.c:2025:1: start of procedure t2p_read_tiff_size_tile()
2023. */
2024. 
2025. void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){
      ^
2026. 
2027. 	uint64* tbc = NULL;

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

tools/tiff2pdf.c:2028:2: 
2026. 
2027. 	uint64* tbc = NULL;
2028. 	uint16 edge=0;
       ^
2029. #ifdef JPEG_SUPPORT
2030. 	unsigned char* jpt;

tools/tiff2pdf.c:2034:2: 
2032.         uint64 k;
2033. 
2034. 	edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
       ^
2035. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
2036. 	

tools/tiff2pdf.c:2099:1: start of procedure t2p_tile_is_right_edge()
  2097.  */
  2098. 
  2099. int t2p_tile_is_right_edge(T2P_TILES tiles, ttile_t tile){
        ^
  2100. 
  2101. 	if( ((tile+1) % tiles.tiles_tilecountx == 0) 

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

tools/tiff2pdf.c:2105:3: 
  2103. 		return(1);
  2104. 	} else {
  2105. 		return(0);
          ^
  2106. 	}
  2107. }

tools/tiff2pdf.c:2107:1: return from a call to t2p_tile_is_right_edge
  2105. 		return(0);
  2106. 	}
  2107. }
        ^
  2108. 
  2109. /*

tools/tiff2pdf.c:2035:2: 
2033. 
2034. 	edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
2035. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
       ^
2036. 	
2037. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){

tools/tiff2pdf.c:2114:1: start of procedure t2p_tile_is_bottom_edge()
  2112.  */
  2113. 
  2114. int t2p_tile_is_bottom_edge(T2P_TILES tiles, ttile_t tile){
        ^
  2115. 
  2116. 	if( ((tile+1) > (tiles.tiles_tilecount-tiles.tiles_tilecountx) )

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

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

tools/tiff2pdf.c:2122:1: return from a call to t2p_tile_is_bottom_edge
  2120. 		return(0);
  2121. 	}
  2122. }
        ^
  2123. 
  2124. /*

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

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

tools/tiff2pdf.c:2050:4: 
2048. 			return;
2049. 		} else {
2050. 			TIFFGetField(input, TIFFTAG_TILEBYTECOUNTS, &tbc);
         ^
2051. 			k=tbc[tile];
2052. #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:2051:4: 
2049. 		} else {
2050. 			TIFFGetField(input, TIFFTAG_TILEBYTECOUNTS, &tbc);
2051. 			k=tbc[tile];
         ^
2052. #ifdef OJPEG_SUPPORT
2053. 			if(t2p->tiff_compression==COMPRESSION_OJPEG){
