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

tools/tiff2pdf.c:1935:1: start of procedure t2p_read_tiff_size_tile()
1933. */
1934. 
1935. void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){
      ^
1936. 
1937. 	uint64* tbc = NULL;

tools/tiff2pdf.c:1937:2: 
1935. void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){
1936. 
1937. 	uint64* tbc = NULL;
       ^
1938. 	uint16 edge=0;
1939. #ifdef JPEG_SUPPORT

tools/tiff2pdf.c:1938:2: 
1936. 
1937. 	uint64* tbc = NULL;
1938. 	uint16 edge=0;
       ^
1939. #ifdef JPEG_SUPPORT
1940. 	unsigned char* jpt;

tools/tiff2pdf.c:1944:2: 
1942.         uint64 k;
1943. 
1944. 	edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
       ^
1945. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
1946. 	

tools/tiff2pdf.c:2009:1: start of procedure t2p_tile_is_right_edge()
  2007.  */
  2008. 
  2009. int t2p_tile_is_right_edge(T2P_TILES tiles, ttile_t tile){
        ^
  2010. 
  2011. 	if( ((tile+1) % tiles.tiles_tilecountx == 0) 

tools/tiff2pdf.c:2011:7: Taking false branch
  2009. int t2p_tile_is_right_edge(T2P_TILES tiles, ttile_t tile){
  2010. 
  2011. 	if( ((tile+1) % tiles.tiles_tilecountx == 0) 
              ^
  2012. 		&& (tiles.tiles_edgetilewidth != 0) ){
  2013. 		return(1);

tools/tiff2pdf.c:2015:3: 
  2013. 		return(1);
  2014. 	} else {
  2015. 		return(0);
          ^
  2016. 	}
  2017. }

tools/tiff2pdf.c:2017:1: return from a call to t2p_tile_is_right_edge
  2015. 		return(0);
  2016. 	}
  2017. }
        ^
  2018. 
  2019. /*

tools/tiff2pdf.c:1945:2: 
1943. 
1944. 	edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
1945. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
       ^
1946. 	
1947. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){

tools/tiff2pdf.c:2024:1: start of procedure t2p_tile_is_bottom_edge()
  2022.  */
  2023. 
  2024. int t2p_tile_is_bottom_edge(T2P_TILES tiles, ttile_t tile){
        ^
  2025. 
  2026. 	if( ((tile+1) > (tiles.tiles_tilecount-tiles.tiles_tilecountx) )

tools/tiff2pdf.c:2026:7: Taking false branch
  2024. int t2p_tile_is_bottom_edge(T2P_TILES tiles, ttile_t tile){
  2025. 
  2026. 	if( ((tile+1) > (tiles.tiles_tilecount-tiles.tiles_tilecountx) )
              ^
  2027. 		&& (tiles.tiles_edgetilelength != 0) ){
  2028. 		return(1);

tools/tiff2pdf.c:2030:3: 
  2028. 		return(1);
  2029. 	} else {
  2030. 		return(0);
          ^
  2031. 	}
  2032. }

tools/tiff2pdf.c:2032:1: return from a call to t2p_tile_is_bottom_edge
  2030. 		return(0);
  2031. 	}
  2032. }
        ^
  2033. 
  2034. /*

tools/tiff2pdf.c:1947:5: Taking true branch
1945. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
1946. 	
1947. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){
          ^
1948. 		if(edge
1949. #if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT)

tools/tiff2pdf.c:1948:6: Taking false branch
1946. 	
1947. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){
1948. 		if(edge
           ^
1949. #if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT)
1950. 		&& !(t2p->pdf_compression==T2P_COMPRESS_JPEG)

tools/tiff2pdf.c:1960:4: 
1958. 			return;
1959. 		} else {
1960. 			TIFFGetField(input, TIFFTAG_TILEBYTECOUNTS, &tbc);
         ^
1961. 			k=tbc[tile];
1962. #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:1961:4: 
1959. 		} else {
1960. 			TIFFGetField(input, TIFFTAG_TILEBYTECOUNTS, &tbc);
1961. 			k=tbc[tile];
         ^
1962. #ifdef OJPEG_SUPPORT
1963. 			if(t2p->tiff_compression==COMPRESSION_OJPEG){
