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

tools/tiff2pdf.c:1941:1: start of procedure t2p_read_tiff_size_tile()
1939. */
1940. 
1941. void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){
      ^
1942. 
1943. 	uint64* tbc = NULL;

tools/tiff2pdf.c:1943:2: 
1941. void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){
1942. 
1943. 	uint64* tbc = NULL;
       ^
1944. 	uint16 edge=0;
1945. #ifdef JPEG_SUPPORT

tools/tiff2pdf.c:1944:2: 
1942. 
1943. 	uint64* tbc = NULL;
1944. 	uint16 edge=0;
       ^
1945. #ifdef JPEG_SUPPORT
1946. 	unsigned char* jpt;

tools/tiff2pdf.c:1950:2: 
1948.         uint64 k;
1949. 
1950. 	edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
       ^
1951. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
1952. 	

tools/tiff2pdf.c:2015:1: start of procedure t2p_tile_is_right_edge()
  2013.  */
  2014. 
  2015. int t2p_tile_is_right_edge(T2P_TILES tiles, ttile_t tile){
        ^
  2016. 
  2017. 	if( ((tile+1) % tiles.tiles_tilecountx == 0) 

tools/tiff2pdf.c:2017:7: Taking false branch
  2015. int t2p_tile_is_right_edge(T2P_TILES tiles, ttile_t tile){
  2016. 
  2017. 	if( ((tile+1) % tiles.tiles_tilecountx == 0) 
              ^
  2018. 		&& (tiles.tiles_edgetilewidth != 0) ){
  2019. 		return(1);

tools/tiff2pdf.c:2021:3: 
  2019. 		return(1);
  2020. 	} else {
  2021. 		return(0);
          ^
  2022. 	}
  2023. }

tools/tiff2pdf.c:2023:1: return from a call to t2p_tile_is_right_edge
  2021. 		return(0);
  2022. 	}
  2023. }
        ^
  2024. 
  2025. /*

tools/tiff2pdf.c:1951:2: 
1949. 
1950. 	edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
1951. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
       ^
1952. 	
1953. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){

tools/tiff2pdf.c:2030:1: start of procedure t2p_tile_is_bottom_edge()
  2028.  */
  2029. 
  2030. int t2p_tile_is_bottom_edge(T2P_TILES tiles, ttile_t tile){
        ^
  2031. 
  2032. 	if( ((tile+1) > (tiles.tiles_tilecount-tiles.tiles_tilecountx) )

tools/tiff2pdf.c:2032:7: Taking false branch
  2030. int t2p_tile_is_bottom_edge(T2P_TILES tiles, ttile_t tile){
  2031. 
  2032. 	if( ((tile+1) > (tiles.tiles_tilecount-tiles.tiles_tilecountx) )
              ^
  2033. 		&& (tiles.tiles_edgetilelength != 0) ){
  2034. 		return(1);

tools/tiff2pdf.c:2036:3: 
  2034. 		return(1);
  2035. 	} else {
  2036. 		return(0);
          ^
  2037. 	}
  2038. }

tools/tiff2pdf.c:2038:1: return from a call to t2p_tile_is_bottom_edge
  2036. 		return(0);
  2037. 	}
  2038. }
        ^
  2039. 
  2040. /*

tools/tiff2pdf.c:1953:5: Taking true branch
1951. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
1952. 	
1953. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){
          ^
1954. 		if(edge
1955. #if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT)

tools/tiff2pdf.c:1954:6: Taking false branch
1952. 	
1953. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){
1954. 		if(edge
           ^
1955. #if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT)
1956. 		&& !(t2p->pdf_compression==T2P_COMPRESS_JPEG)

tools/tiff2pdf.c:1966:4: 
1964. 			return;
1965. 		} else {
1966. 			TIFFGetField(input, TIFFTAG_TILEBYTECOUNTS, &tbc);
         ^
1967. 			k=tbc[tile];
1968. #ifdef OJPEG_SUPPORT

libtiff/tif_dir.c:1131:1: start of procedure TIFFGetField()
  1129.  * internal directory structure.
  1130.  */
  1131. int
        ^
  1132. TIFFGetField(TIFF* tif, uint32 tag, ...)
  1133. {

libtiff/tif_dir.c:1137:2: 
  1135. 	va_list ap;
  1136. 
  1137. 	va_start(ap, tag);
         ^
  1138. 	status = TIFFVGetField(tif, tag, ap);
  1139. 	va_end(ap);

libtiff/tif_dir.c:1138:2: Skipping TIFFVGetField(): empty list of specs
  1136. 
  1137. 	va_start(ap, tag);
  1138. 	status = TIFFVGetField(tif, tag, ap);
         ^
  1139. 	va_end(ap);
  1140. 	return (status);

libtiff/tif_dir.c:1139:2: 
  1137. 	va_start(ap, tag);
  1138. 	status = TIFFVGetField(tif, tag, ap);
  1139. 	va_end(ap);
         ^
  1140. 	return (status);
  1141. }

libtiff/tif_dir.c:1140:2: 
  1138. 	status = TIFFVGetField(tif, tag, ap);
  1139. 	va_end(ap);
  1140. 	return (status);
         ^
  1141. }
  1142. 

libtiff/tif_dir.c:1141:1: return from a call to TIFFGetField
  1139. 	va_end(ap);
  1140. 	return (status);
  1141. }
        ^
  1142. 
  1143. /*

tools/tiff2pdf.c:1967:4: 
1965. 		} else {
1966. 			TIFFGetField(input, TIFFTAG_TILEBYTECOUNTS, &tbc);
1967. 			k=tbc[tile];
         ^
1968. #ifdef OJPEG_SUPPORT
1969. 			if(t2p->tiff_compression==COMPRESSION_OJPEG){
