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

tools/tiff2pdf.c:1877:1: start of procedure t2p_read_tiff_size_tile()
1875. */
1876. 
1877. void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){
      ^
1878. 
1879. 	uint64* tbc = NULL;

tools/tiff2pdf.c:1879:2: 
1877. void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){
1878. 
1879. 	uint64* tbc = NULL;
       ^
1880. 	uint16 edge=0;
1881. #ifdef JPEG_SUPPORT

tools/tiff2pdf.c:1880:2: 
1878. 
1879. 	uint64* tbc = NULL;
1880. 	uint16 edge=0;
       ^
1881. #ifdef JPEG_SUPPORT
1882. 	unsigned char* jpt;

tools/tiff2pdf.c:1885:2: 
1883. #endif
1884. 
1885. 	edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
       ^
1886. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
1887. 	

tools/tiff2pdf.c:1932:1: start of procedure t2p_tile_is_right_edge()
  1930.  */
  1931. 
  1932. int t2p_tile_is_right_edge(T2P_TILES tiles, ttile_t tile){
        ^
  1933. 
  1934. 	if( ((tile+1) % tiles.tiles_tilecountx == 0) 

tools/tiff2pdf.c:1934:7: Taking false branch
  1932. int t2p_tile_is_right_edge(T2P_TILES tiles, ttile_t tile){
  1933. 
  1934. 	if( ((tile+1) % tiles.tiles_tilecountx == 0) 
              ^
  1935. 		&& (tiles.tiles_edgetilewidth != 0) ){
  1936. 		return(1);

tools/tiff2pdf.c:1938:3: 
  1936. 		return(1);
  1937. 	} else {
  1938. 		return(0);
          ^
  1939. 	}
  1940. }

tools/tiff2pdf.c:1940:1: return from a call to t2p_tile_is_right_edge
  1938. 		return(0);
  1939. 	}
  1940. }
        ^
  1941. 
  1942. /*

tools/tiff2pdf.c:1886:2: 
1884. 
1885. 	edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
1886. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
       ^
1887. 	
1888. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){

tools/tiff2pdf.c:1947:1: start of procedure t2p_tile_is_bottom_edge()
  1945.  */
  1946. 
  1947. int t2p_tile_is_bottom_edge(T2P_TILES tiles, ttile_t tile){
        ^
  1948. 
  1949. 	if( ((tile+1) > (tiles.tiles_tilecount-tiles.tiles_tilecountx) )

tools/tiff2pdf.c:1949:7: Taking false branch
  1947. int t2p_tile_is_bottom_edge(T2P_TILES tiles, ttile_t tile){
  1948. 
  1949. 	if( ((tile+1) > (tiles.tiles_tilecount-tiles.tiles_tilecountx) )
              ^
  1950. 		&& (tiles.tiles_edgetilelength != 0) ){
  1951. 		return(1);

tools/tiff2pdf.c:1953:3: 
  1951. 		return(1);
  1952. 	} else {
  1953. 		return(0);
          ^
  1954. 	}
  1955. }

tools/tiff2pdf.c:1955:1: return from a call to t2p_tile_is_bottom_edge
  1953. 		return(0);
  1954. 	}
  1955. }
        ^
  1956. 
  1957. /*

tools/tiff2pdf.c:1888:5: Taking true branch
1886. 	edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
1887. 	
1888. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){
          ^
1889. 		if(edge
1890. #if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT)

tools/tiff2pdf.c:1889:6: Taking false branch
1887. 	
1888. 	if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){
1889. 		if(edge
           ^
1890. #if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT)
1891. 		&& !(t2p->pdf_compression==T2P_COMPRESS_JPEG)

tools/tiff2pdf.c:1897:4: 
1895. 			return;
1896. 		} else {
1897. 			TIFFGetField(input, TIFFTAG_TILEBYTECOUNTS, &tbc);
         ^
1898. 			t2p->tiff_datasize=(tmsize_t)tbc[tile];
1899. #ifdef OJPEG_SUPPORT

libtiff/tif_dir.c:1050:1: start of procedure TIFFGetField()
  1048.  * internal directory structure.
  1049.  */
  1050. int
        ^
  1051. TIFFGetField(TIFF* tif, uint32 tag, ...)
  1052. {

libtiff/tif_dir.c:1056:2: 
  1054. 	va_list ap;
  1055. 
  1056. 	va_start(ap, tag);
         ^
  1057. 	status = TIFFVGetField(tif, tag, ap);
  1058. 	va_end(ap);

libtiff/tif_dir.c:1057:2: Skipping TIFFVGetField(): empty list of specs
  1055. 
  1056. 	va_start(ap, tag);
  1057. 	status = TIFFVGetField(tif, tag, ap);
         ^
  1058. 	va_end(ap);
  1059. 	return (status);

libtiff/tif_dir.c:1058:2: 
  1056. 	va_start(ap, tag);
  1057. 	status = TIFFVGetField(tif, tag, ap);
  1058. 	va_end(ap);
         ^
  1059. 	return (status);
  1060. }

libtiff/tif_dir.c:1059:2: 
  1057. 	status = TIFFVGetField(tif, tag, ap);
  1058. 	va_end(ap);
  1059. 	return (status);
         ^
  1060. }
  1061. 

libtiff/tif_dir.c:1060:1: return from a call to TIFFGetField
  1058. 	va_end(ap);
  1059. 	return (status);
  1060. }
        ^
  1061. 
  1062. /*

tools/tiff2pdf.c:1898:4: 
1896. 		} else {
1897. 			TIFFGetField(input, TIFFTAG_TILEBYTECOUNTS, &tbc);
1898. 			t2p->tiff_datasize=(tmsize_t)tbc[tile];
         ^
1899. #ifdef OJPEG_SUPPORT
1900. 			if(t2p->tiff_compression==COMPRESSION_OJPEG){
