tools/tiff2pdf.c:2010: error: Null Dereference
  pointer `sbc` last assigned on line 1968 could be null and is dereferenced at line 2010, column 23.

tools/tiff2pdf.c:1966:1: start of procedure t2p_read_tiff_size()
1964. */
1965. 
1966. void t2p_read_tiff_size(T2P* t2p, TIFF* input){
      ^
1967. 
1968. 	uint64* sbc=NULL;

tools/tiff2pdf.c:1968:2: 
1966. void t2p_read_tiff_size(T2P* t2p, TIFF* input){
1967. 
1968. 	uint64* sbc=NULL;
       ^
1969. #if defined(JPEG_SUPPORT) || defined (OJPEG_SUPPORT)
1970. 	unsigned char* jpt=NULL;

tools/tiff2pdf.c:1970:2: 
1968. 	uint64* sbc=NULL;
1969. #if defined(JPEG_SUPPORT) || defined (OJPEG_SUPPORT)
1970. 	unsigned char* jpt=NULL;
       ^
1971. 	tstrip_t i=0;
1972. 	tstrip_t stripcount=0;

tools/tiff2pdf.c:1971:2: 
1969. #if defined(JPEG_SUPPORT) || defined (OJPEG_SUPPORT)
1970. 	unsigned char* jpt=NULL;
1971. 	tstrip_t i=0;
       ^
1972. 	tstrip_t stripcount=0;
1973. #endif

tools/tiff2pdf.c:1972:2: 
1970. 	unsigned char* jpt=NULL;
1971. 	tstrip_t i=0;
1972. 	tstrip_t stripcount=0;
       ^
1973. #endif
1974.         uint64 k = 0;

tools/tiff2pdf.c:1974:9: 
1972. 	tstrip_t stripcount=0;
1973. #endif
1974.         uint64 k = 0;
              ^
1975. 
1976. 	if(t2p->pdf_transcode == T2P_TRANSCODE_RAW){

tools/tiff2pdf.c:1976:5: Taking true branch
1974.         uint64 k = 0;
1975. 
1976. 	if(t2p->pdf_transcode == T2P_TRANSCODE_RAW){
          ^
1977. #ifdef CCITT_SUPPORT
1978. 		if(t2p->pdf_compression == T2P_COMPRESS_G4 ){

tools/tiff2pdf.c:1978:6: Taking false branch
1976. 	if(t2p->pdf_transcode == T2P_TRANSCODE_RAW){
1977. #ifdef CCITT_SUPPORT
1978. 		if(t2p->pdf_compression == T2P_COMPRESS_G4 ){
           ^
1979. 			TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc);
1980.             if (sbc[0] != (uint64)(tmsize_t)sbc[0]) {

tools/tiff2pdf.c:1989:6: Taking false branch
1987. #endif
1988. #ifdef ZIP_SUPPORT
1989. 		if(t2p->pdf_compression == T2P_COMPRESS_ZIP){
           ^
1990. 			TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc);
1991.             if (sbc[0] != (uint64)(tmsize_t)sbc[0]) {

tools/tiff2pdf.c:2000:6: Taking true branch
1998. #endif
1999. #ifdef OJPEG_SUPPORT
2000. 		if(t2p->tiff_compression == COMPRESSION_OJPEG){
           ^
2001. 			if(!TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc)){
2002. 				TIFFError(TIFF2PDF_MODULE, 

tools/tiff2pdf.c:2001:8: 
1999. #ifdef OJPEG_SUPPORT
2000. 		if(t2p->tiff_compression == COMPRESSION_OJPEG){
2001. 			if(!TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc)){
             ^
2002. 				TIFFError(TIFF2PDF_MODULE, 
2003. 					"Input file %s missing field: TIFFTAG_STRIPBYTECOUNTS",

libtiff/tif_dir.c:1269:1: start of procedure TIFFGetField()
  1267.  * internal directory structure.
  1268.  */
  1269. int
        ^
  1270. TIFFGetField(TIFF* tif, uint32 tag, ...)
  1271. {

libtiff/tif_dir.c:1275:2: 
  1273. 	va_list ap;
  1274. 
  1275. 	va_start(ap, tag);
         ^
  1276. 	status = TIFFVGetField(tif, tag, ap);
  1277. 	va_end(ap);

libtiff/tif_dir.c:1276:2: Skipping TIFFVGetField(): empty list of specs
  1274. 
  1275. 	va_start(ap, tag);
  1276. 	status = TIFFVGetField(tif, tag, ap);
         ^
  1277. 	va_end(ap);
  1278. 	return (status);

libtiff/tif_dir.c:1277:2: 
  1275. 	va_start(ap, tag);
  1276. 	status = TIFFVGetField(tif, tag, ap);
  1277. 	va_end(ap);
         ^
  1278. 	return (status);
  1279. }

libtiff/tif_dir.c:1278:2: 
  1276. 	status = TIFFVGetField(tif, tag, ap);
  1277. 	va_end(ap);
  1278. 	return (status);
         ^
  1279. }
  1280. 

libtiff/tif_dir.c:1279:1: return from a call to TIFFGetField
  1277. 	va_end(ap);
  1278. 	return (status);
  1279. }
        ^
  1280. 
  1281. /*

tools/tiff2pdf.c:2001:8: Taking false branch
1999. #ifdef OJPEG_SUPPORT
2000. 		if(t2p->tiff_compression == COMPRESSION_OJPEG){
2001. 			if(!TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc)){
             ^
2002. 				TIFFError(TIFF2PDF_MODULE, 
2003. 					"Input file %s missing field: TIFFTAG_STRIPBYTECOUNTS",

tools/tiff2pdf.c:2008:4: 
2006. 				return;
2007. 			}
2008. 			stripcount=TIFFNumberOfStrips(input);
         ^
2009. 			for(i=0;i<stripcount;i++){
2010. 				k = checkAdd64(k, sbc[i], t2p);

libtiff/tif_strip.c:58:1: start of procedure TIFFNumberOfStrips()
  56.  * Compute how many strips are in an image.
  57.  */
  58. uint32
      ^
  59. TIFFNumberOfStrips(TIFF* tif)
  60. {

libtiff/tif_strip.c:61:2: 
  59. TIFFNumberOfStrips(TIFF* tif)
  60. {
  61. 	TIFFDirectory *td = &tif->tif_dir;
       ^
  62. 	uint32 nstrips;
  63. 

libtiff/tif_strip.c:64:13: Condition is false
  62. 	uint32 nstrips;
  63. 
  64. 	nstrips = (td->td_rowsperstrip == (uint32) -1 ? 1 :
                  ^
  65. 	     TIFFhowmany_32(td->td_imagelength, td->td_rowsperstrip));
  66. 	if (td->td_planarconfig == PLANARCONFIG_SEPARATE)

libtiff/tif_strip.c:65:7: Condition is true
  63. 
  64. 	nstrips = (td->td_rowsperstrip == (uint32) -1 ? 1 :
  65. 	     TIFFhowmany_32(td->td_imagelength, td->td_rowsperstrip));
            ^
  66. 	if (td->td_planarconfig == PLANARCONFIG_SEPARATE)
  67. 		nstrips = _TIFFMultiply32(tif, nstrips, (uint32)td->td_samplesperpixel,

libtiff/tif_strip.c:64:13: 
  62. 	uint32 nstrips;
  63. 
  64. 	nstrips = (td->td_rowsperstrip == (uint32) -1 ? 1 :
                  ^
  65. 	     TIFFhowmany_32(td->td_imagelength, td->td_rowsperstrip));
  66. 	if (td->td_planarconfig == PLANARCONFIG_SEPARATE)

libtiff/tif_strip.c:64:2: 
  62. 	uint32 nstrips;
  63. 
  64. 	nstrips = (td->td_rowsperstrip == (uint32) -1 ? 1 :
       ^
  65. 	     TIFFhowmany_32(td->td_imagelength, td->td_rowsperstrip));
  66. 	if (td->td_planarconfig == PLANARCONFIG_SEPARATE)

libtiff/tif_strip.c:66:6: Taking true branch
  64. 	nstrips = (td->td_rowsperstrip == (uint32) -1 ? 1 :
  65. 	     TIFFhowmany_32(td->td_imagelength, td->td_rowsperstrip));
  66. 	if (td->td_planarconfig == PLANARCONFIG_SEPARATE)
           ^
  67. 		nstrips = _TIFFMultiply32(tif, nstrips, (uint32)td->td_samplesperpixel,
  68. 		    "TIFFNumberOfStrips");

libtiff/tif_strip.c:67:3: 
  65. 	     TIFFhowmany_32(td->td_imagelength, td->td_rowsperstrip));
  66. 	if (td->td_planarconfig == PLANARCONFIG_SEPARATE)
  67. 		nstrips = _TIFFMultiply32(tif, nstrips, (uint32)td->td_samplesperpixel,
        ^
  68. 		    "TIFFNumberOfStrips");
  69. 	return (nstrips);

libtiff/tif_aux.c:35:1: start of procedure _TIFFMultiply32()
    33. #include <float.h>
    34. 
    35. uint32
        ^
    36. _TIFFMultiply32(TIFF* tif, uint32 first, uint32 second, const char* where)
    37. {

libtiff/tif_aux.c:38:6: Taking true branch
    36. _TIFFMultiply32(TIFF* tif, uint32 first, uint32 second, const char* where)
    37. {
    38. 	if (second && first > TIFF_UINT32_MAX / second) {
             ^
    39. 		TIFFErrorExt(tif->tif_clientdata, where, "Integer overflow in %s", where);
    40. 		return 0;

libtiff/tif_aux.c:38:16: Taking false branch
    36. _TIFFMultiply32(TIFF* tif, uint32 first, uint32 second, const char* where)
    37. {
    38. 	if (second && first > TIFF_UINT32_MAX / second) {
                       ^
    39. 		TIFFErrorExt(tif->tif_clientdata, where, "Integer overflow in %s", where);
    40. 		return 0;

libtiff/tif_aux.c:43:2: 
    41. 	}
    42. 
    43. 	return first * second;
         ^
    44. }
    45. 

libtiff/tif_aux.c:44:1: return from a call to _TIFFMultiply32
    42. 
    43. 	return first * second;
    44. }
        ^
    45. 
    46. uint64

libtiff/tif_strip.c:69:2: 
  67. 		nstrips = _TIFFMultiply32(tif, nstrips, (uint32)td->td_samplesperpixel,
  68. 		    "TIFFNumberOfStrips");
  69. 	return (nstrips);
       ^
  70. }
  71. 

libtiff/tif_strip.c:70:1: return from a call to TIFFNumberOfStrips
  68. 		    "TIFFNumberOfStrips");
  69. 	return (nstrips);
  70. }
      ^
  71. 
  72. /*

tools/tiff2pdf.c:2009:8: 
2007. 			}
2008. 			stripcount=TIFFNumberOfStrips(input);
2009. 			for(i=0;i<stripcount;i++){
             ^
2010. 				k = checkAdd64(k, sbc[i], t2p);
2011. 			}

tools/tiff2pdf.c:2009:12: Loop condition is true. Entering loop body
2007. 			}
2008. 			stripcount=TIFFNumberOfStrips(input);
2009. 			for(i=0;i<stripcount;i++){
                 ^
2010. 				k = checkAdd64(k, sbc[i], t2p);
2011. 			}

tools/tiff2pdf.c:2010:5: 
2008. 			stripcount=TIFFNumberOfStrips(input);
2009. 			for(i=0;i<stripcount;i++){
2010. 				k = checkAdd64(k, sbc[i], t2p);
          ^
2011. 			}
2012. 			if(TIFFGetField(input, TIFFTAG_JPEGIFOFFSET, &(t2p->tiff_dataoffset))){
