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

tools/tiff2pdf.c:1892:1: start of procedure t2p_read_tiff_size()
1890. */
1891. 
1892. void t2p_read_tiff_size(T2P* t2p, TIFF* input){
      ^
1893. 
1894. 	uint64* sbc=NULL;

tools/tiff2pdf.c:1894:2: 
1892. void t2p_read_tiff_size(T2P* t2p, TIFF* input){
1893. 
1894. 	uint64* sbc=NULL;
       ^
1895. #if defined(JPEG_SUPPORT) || defined (OJPEG_SUPPORT)
1896. 	unsigned char* jpt=NULL;

tools/tiff2pdf.c:1896:2: 
1894. 	uint64* sbc=NULL;
1895. #if defined(JPEG_SUPPORT) || defined (OJPEG_SUPPORT)
1896. 	unsigned char* jpt=NULL;
       ^
1897. 	tstrip_t i=0;
1898. 	tstrip_t stripcount=0;

tools/tiff2pdf.c:1897:2: 
1895. #if defined(JPEG_SUPPORT) || defined (OJPEG_SUPPORT)
1896. 	unsigned char* jpt=NULL;
1897. 	tstrip_t i=0;
       ^
1898. 	tstrip_t stripcount=0;
1899. #endif

tools/tiff2pdf.c:1898:2: 
1896. 	unsigned char* jpt=NULL;
1897. 	tstrip_t i=0;
1898. 	tstrip_t stripcount=0;
       ^
1899. #endif
1900.         uint64 k = 0;

tools/tiff2pdf.c:1900:9: 
1898. 	tstrip_t stripcount=0;
1899. #endif
1900.         uint64 k = 0;
              ^
1901. 
1902. 	if(t2p->pdf_transcode == T2P_TRANSCODE_RAW){

tools/tiff2pdf.c:1902:5: Taking true branch
1900.         uint64 k = 0;
1901. 
1902. 	if(t2p->pdf_transcode == T2P_TRANSCODE_RAW){
          ^
1903. #ifdef CCITT_SUPPORT
1904. 		if(t2p->pdf_compression == T2P_COMPRESS_G4 ){

tools/tiff2pdf.c:1904:6: Taking false branch
1902. 	if(t2p->pdf_transcode == T2P_TRANSCODE_RAW){
1903. #ifdef CCITT_SUPPORT
1904. 		if(t2p->pdf_compression == T2P_COMPRESS_G4 ){
           ^
1905. 			TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc);
1906.             if (sbc[0] != (uint64)(tmsize_t)sbc[0]) {

tools/tiff2pdf.c:1915:6: Taking false branch
1913. #endif
1914. #ifdef ZIP_SUPPORT
1915. 		if(t2p->pdf_compression == T2P_COMPRESS_ZIP){
           ^
1916. 			TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc);
1917.             if (sbc[0] != (uint64)(tmsize_t)sbc[0]) {

tools/tiff2pdf.c:1926:6: Taking true branch
1924. #endif
1925. #ifdef OJPEG_SUPPORT
1926. 		if(t2p->tiff_compression == COMPRESSION_OJPEG){
           ^
1927. 			if(!TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc)){
1928. 				TIFFError(TIFF2PDF_MODULE, 

tools/tiff2pdf.c:1927:8: 
1925. #ifdef OJPEG_SUPPORT
1926. 		if(t2p->tiff_compression == COMPRESSION_OJPEG){
1927. 			if(!TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc)){
             ^
1928. 				TIFFError(TIFF2PDF_MODULE, 
1929. 					"Input file %s missing field: TIFFTAG_STRIPBYTECOUNTS",

libtiff/tif_dir.c:1211:1: start of procedure TIFFGetField()
  1209.  * internal directory structure.
  1210.  */
  1211. int
        ^
  1212. TIFFGetField(TIFF* tif, uint32 tag, ...)
  1213. {

libtiff/tif_dir.c:1217:2: 
  1215. 	va_list ap;
  1216. 
  1217. 	va_start(ap, tag);
         ^
  1218. 	status = TIFFVGetField(tif, tag, ap);
  1219. 	va_end(ap);

libtiff/tif_dir.c:1218:2: Skipping TIFFVGetField(): empty list of specs
  1216. 
  1217. 	va_start(ap, tag);
  1218. 	status = TIFFVGetField(tif, tag, ap);
         ^
  1219. 	va_end(ap);
  1220. 	return (status);

libtiff/tif_dir.c:1219:2: 
  1217. 	va_start(ap, tag);
  1218. 	status = TIFFVGetField(tif, tag, ap);
  1219. 	va_end(ap);
         ^
  1220. 	return (status);
  1221. }

libtiff/tif_dir.c:1220:2: 
  1218. 	status = TIFFVGetField(tif, tag, ap);
  1219. 	va_end(ap);
  1220. 	return (status);
         ^
  1221. }
  1222. 

libtiff/tif_dir.c:1221:1: return from a call to TIFFGetField
  1219. 	va_end(ap);
  1220. 	return (status);
  1221. }
        ^
  1222. 
  1223. /*

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

tools/tiff2pdf.c:1934:4: 
1932. 				return;
1933. 			}
1934. 			stripcount=TIFFNumberOfStrips(input);
         ^
1935. 			for(i=0;i<stripcount;i++){
1936. 				k = checkAdd64(k, sbc[i], t2p);

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

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

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

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

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

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

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

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

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

libtiff/tif_aux.c:39:2: 
    37. _TIFFMultiply32(TIFF* tif, uint32 first, uint32 second, const char* where)
    38. {
    39. 	uint32 bytes = first * second;
         ^
    40. 
    41. 	if (second && bytes / second != first) {

libtiff/tif_aux.c:41:6: Taking true branch
    39. 	uint32 bytes = first * second;
    40. 
    41. 	if (second && bytes / second != first) {
             ^
    42. 		TIFFErrorExt(tif->tif_clientdata, where, "Integer overflow in %s", where);
    43. 		bytes = 0;

libtiff/tif_aux.c:41:16: Taking false branch
    39. 	uint32 bytes = first * second;
    40. 
    41. 	if (second && bytes / second != first) {
                       ^
    42. 		TIFFErrorExt(tif->tif_clientdata, where, "Integer overflow in %s", where);
    43. 		bytes = 0;

libtiff/tif_aux.c:46:2: 
    44. 	}
    45. 
    46. 	return bytes;
         ^
    47. }
    48. 

libtiff/tif_aux.c:47:1: return from a call to _TIFFMultiply32
    45. 
    46. 	return bytes;
    47. }
        ^
    48. 
    49. uint64

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

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

tools/tiff2pdf.c:1935:8: 
1933. 			}
1934. 			stripcount=TIFFNumberOfStrips(input);
1935. 			for(i=0;i<stripcount;i++){
             ^
1936. 				k = checkAdd64(k, sbc[i], t2p);
1937. 			}

tools/tiff2pdf.c:1935:12: Loop condition is true. Entering loop body
1933. 			}
1934. 			stripcount=TIFFNumberOfStrips(input);
1935. 			for(i=0;i<stripcount;i++){
                 ^
1936. 				k = checkAdd64(k, sbc[i], t2p);
1937. 			}

tools/tiff2pdf.c:1936:5: 
1934. 			stripcount=TIFFNumberOfStrips(input);
1935. 			for(i=0;i<stripcount;i++){
1936. 				k = checkAdd64(k, sbc[i], t2p);
          ^
1937. 			}
1938. 			if(TIFFGetField(input, TIFFTAG_JPEGIFOFFSET, &(t2p->tiff_dataoffset))){

void t2p_read_tiff_size(T2P* t2p, TIFF* input){
	uint64* sbc=NULL;
#if defined(JPEG_SUPPORT) || defined (OJPEG_SUPPORT)
	unsigned char* jpt=NULL;
	tstrip_t i=0;
	tstrip_t stripcount=0;
#endif
        uint64 k = 0;
	if(t2p->pdf_transcode == T2P_TRANSCODE_RAW){
#ifdef CCITT_SUPPORT
		if(t2p->pdf_compression == T2P_COMPRESS_G4 ){
			TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc);
            if (sbc[0] != (uint64)(tmsize_t)sbc[0]) {
                TIFFError(TIFF2PDF_MODULE, "Integer overflow");
                t2p->t2p_error = T2P_ERR_ERROR;
            }
			t2p->tiff_datasize=(tmsize_t)sbc[0];
			return;
		}
#endif
#ifdef ZIP_SUPPORT
		if(t2p->pdf_compression == T2P_COMPRESS_ZIP){
			TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc);
            if (sbc[0] != (uint64)(tmsize_t)sbc[0]) {
                TIFFError(TIFF2PDF_MODULE, "Integer overflow");
                t2p->t2p_error = T2P_ERR_ERROR;
            }
			t2p->tiff_datasize=(tmsize_t)sbc[0];
			return;
		}
#endif
#ifdef OJPEG_SUPPORT
		if(t2p->tiff_compression == COMPRESSION_OJPEG){
			if(!TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc)){
				TIFFError(TIFF2PDF_MODULE,
					"Input file %s missing field: TIFFTAG_STRIPBYTECOUNTS",
					TIFFFileName(input));
				t2p->t2p_error = T2P_ERR_ERROR;
				return;
			}
			stripcount=TIFFNumberOfStrips(input);
			for(i=0;i<stripcount;i++){
				k = checkAdd64(k, sbc[i], t2p);
			}
			if(TIFFGetField(input, TIFFTAG_JPEGIFOFFSET, &(t2p->tiff_dataoffset))){
				if(t2p->tiff_dataoffset != 0){
					if(TIFFGetField(input, TIFFTAG_JPEGIFBYTECOUNT, &(t2p->tiff_datasize))!=0){
						if((uint64)t2p->tiff_datasize < k) {
							TIFFWarning(TIFF2PDF_MODULE,
								"Input file %s has short JPEG interchange file byte count",
								TIFFFileName(input));
							t2p->pdf_ojpegiflength=t2p->tiff_datasize;
							k = checkAdd64(k, t2p->tiff_datasize, t2p);
							k = checkAdd64(k, 6, t2p);
							k = checkAdd64(k, stripcount, t2p);
							k = checkAdd64(k, stripcount, t2p);
							t2p->tiff_datasize = (tsize_t) k;
							if ((uint64) t2p->tiff_datasize != k) {
								TIFFError(TIFF2PDF_MODULE, "Integer overflow");
								t2p->t2p_error = T2P_ERR_ERROR;
							}
							return;
						}
						return;
					}else {
						TIFFError(TIFF2PDF_MODULE,
							"Input file %s missing field: TIFFTAG_JPEGIFBYTECOUNT",
							TIFFFileName(input));
							t2p->t2p_error = T2P_ERR_ERROR;
							return;
					}
				}
			}
			k = checkAdd64(k, stripcount, t2p);
			k = checkAdd64(k, stripcount, t2p);
			k = checkAdd64(k, 2048, t2p);
			t2p->tiff_datasize = (tsize_t) k;
			if ((uint64) t2p->tiff_datasize != k) {
				TIFFError(TIFF2PDF_MODULE, "Integer overflow");
				t2p->t2p_error = T2P_ERR_ERROR;
			}
			return;
		}
#endif
#ifdef JPEG_SUPPORT
		if(t2p->tiff_compression == COMPRESSION_JPEG) {
			uint32 count = 0;
			if(TIFFGetField(input, TIFFTAG_JPEGTABLES, &count, &jpt) != 0 ){
				if(count > 4){
					k += count;
					k -= 2;
				}
			} else {
				k = 2;
			}
			stripcount=TIFFNumberOfStrips(input);
			if(!TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc)){
				TIFFError(TIFF2PDF_MODULE,
					"Input file %s missing field: TIFFTAG_STRIPBYTECOUNTS",
					TIFFFileName(input));
				t2p->t2p_error = T2P_ERR_ERROR;
				return;
			}
			for(i=0;i<stripcount;i++){
				k = checkAdd64(k, sbc[i], t2p);
				k -=2;
				k +=2;
			}
			k = checkAdd64(k, 2, t2p);
			k = checkAdd64(k, 6, t2p);
			t2p->tiff_datasize = (tsize_t) k;
			if ((uint64) t2p->tiff_datasize != k) {
				TIFFError(TIFF2PDF_MODULE, "Integer overflow");
				t2p->t2p_error = T2P_ERR_ERROR;
			}
			return;
		}
#endif
		(void) 0;
	}
	k = checkMultiply64(TIFFScanlineSize(input), t2p->tiff_length, t2p);
	if(t2p->tiff_planar==PLANARCONFIG_SEPARATE){
		k = checkMultiply64(k, t2p->tiff_samplesperpixel, t2p);
	}
	if (k == 0) {
		t2p->t2p_error = T2P_ERR_ERROR;
	}
	t2p->tiff_datasize = (tsize_t) k;
	if ((uint64) t2p->tiff_datasize != k) {
		TIFFError(TIFF2PDF_MODULE, "Integer overflow");
		t2p->t2p_error = T2P_ERR_ERROR;
	}
	return;
}
['void t2p_read_tiff_size(T2P* t2p, TIFF* input){\n\tuint64* sbc=NULL;\n#if defined(JPEG_SUPPORT) || defined (OJPEG_SUPPORT)\n\tunsigned char* jpt=NULL;\n\ttstrip_t i=0;\n\ttstrip_t stripcount=0;\n#endif\n        uint64 k = 0;\n\tif(t2p->pdf_transcode == T2P_TRANSCODE_RAW){\n#ifdef CCITT_SUPPORT\n\t\tif(t2p->pdf_compression == T2P_COMPRESS_G4 ){\n\t\t\tTIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc);\n            if (sbc[0] != (uint64)(tmsize_t)sbc[0]) {\n                TIFFError(TIFF2PDF_MODULE, "Integer overflow");\n                t2p->t2p_error = T2P_ERR_ERROR;\n            }\n\t\t\tt2p->tiff_datasize=(tmsize_t)sbc[0];\n\t\t\treturn;\n\t\t}\n#endif\n#ifdef ZIP_SUPPORT\n\t\tif(t2p->pdf_compression == T2P_COMPRESS_ZIP){\n\t\t\tTIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc);\n            if (sbc[0] != (uint64)(tmsize_t)sbc[0]) {\n                TIFFError(TIFF2PDF_MODULE, "Integer overflow");\n                t2p->t2p_error = T2P_ERR_ERROR;\n            }\n\t\t\tt2p->tiff_datasize=(tmsize_t)sbc[0];\n\t\t\treturn;\n\t\t}\n#endif\n#ifdef OJPEG_SUPPORT\n\t\tif(t2p->tiff_compression == COMPRESSION_OJPEG){\n\t\t\tif(!TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc)){\n\t\t\t\tTIFFError(TIFF2PDF_MODULE,\n\t\t\t\t\t"Input file %s missing field: TIFFTAG_STRIPBYTECOUNTS",\n\t\t\t\t\tTIFFFileName(input));\n\t\t\t\tt2p->t2p_error = T2P_ERR_ERROR;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tstripcount=TIFFNumberOfStrips(input);\n\t\t\tfor(i=0;i<stripcount;i++){\n\t\t\t\tk = checkAdd64(k, sbc[i], t2p);\n\t\t\t}\n\t\t\tif(TIFFGetField(input, TIFFTAG_JPEGIFOFFSET, &(t2p->tiff_dataoffset))){\n\t\t\t\tif(t2p->tiff_dataoffset != 0){\n\t\t\t\t\tif(TIFFGetField(input, TIFFTAG_JPEGIFBYTECOUNT, &(t2p->tiff_datasize))!=0){\n\t\t\t\t\t\tif((uint64)t2p->tiff_datasize < k) {\n\t\t\t\t\t\t\tTIFFWarning(TIFF2PDF_MODULE,\n\t\t\t\t\t\t\t\t"Input file %s has short JPEG interchange file byte count",\n\t\t\t\t\t\t\t\tTIFFFileName(input));\n\t\t\t\t\t\t\tt2p->pdf_ojpegiflength=t2p->tiff_datasize;\n\t\t\t\t\t\t\tk = checkAdd64(k, t2p->tiff_datasize, t2p);\n\t\t\t\t\t\t\tk = checkAdd64(k, 6, t2p);\n\t\t\t\t\t\t\tk = checkAdd64(k, stripcount, t2p);\n\t\t\t\t\t\t\tk = checkAdd64(k, stripcount, t2p);\n\t\t\t\t\t\t\tt2p->tiff_datasize = (tsize_t) k;\n\t\t\t\t\t\t\tif ((uint64) t2p->tiff_datasize != k) {\n\t\t\t\t\t\t\t\tTIFFError(TIFF2PDF_MODULE, "Integer overflow");\n\t\t\t\t\t\t\t\tt2p->t2p_error = T2P_ERR_ERROR;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tTIFFError(TIFF2PDF_MODULE,\n\t\t\t\t\t\t\t"Input file %s missing field: TIFFTAG_JPEGIFBYTECOUNT",\n\t\t\t\t\t\t\tTIFFFileName(input));\n\t\t\t\t\t\t\tt2p->t2p_error = T2P_ERR_ERROR;\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tk = checkAdd64(k, stripcount, t2p);\n\t\t\tk = checkAdd64(k, stripcount, t2p);\n\t\t\tk = checkAdd64(k, 2048, t2p);\n\t\t\tt2p->tiff_datasize = (tsize_t) k;\n\t\t\tif ((uint64) t2p->tiff_datasize != k) {\n\t\t\t\tTIFFError(TIFF2PDF_MODULE, "Integer overflow");\n\t\t\t\tt2p->t2p_error = T2P_ERR_ERROR;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n#endif\n#ifdef JPEG_SUPPORT\n\t\tif(t2p->tiff_compression == COMPRESSION_JPEG) {\n\t\t\tuint32 count = 0;\n\t\t\tif(TIFFGetField(input, TIFFTAG_JPEGTABLES, &count, &jpt) != 0 ){\n\t\t\t\tif(count > 4){\n\t\t\t\t\tk += count;\n\t\t\t\t\tk -= 2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tk = 2;\n\t\t\t}\n\t\t\tstripcount=TIFFNumberOfStrips(input);\n\t\t\tif(!TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc)){\n\t\t\t\tTIFFError(TIFF2PDF_MODULE,\n\t\t\t\t\t"Input file %s missing field: TIFFTAG_STRIPBYTECOUNTS",\n\t\t\t\t\tTIFFFileName(input));\n\t\t\t\tt2p->t2p_error = T2P_ERR_ERROR;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfor(i=0;i<stripcount;i++){\n\t\t\t\tk = checkAdd64(k, sbc[i], t2p);\n\t\t\t\tk -=2;\n\t\t\t\tk +=2;\n\t\t\t}\n\t\t\tk = checkAdd64(k, 2, t2p);\n\t\t\tk = checkAdd64(k, 6, t2p);\n\t\t\tt2p->tiff_datasize = (tsize_t) k;\n\t\t\tif ((uint64) t2p->tiff_datasize != k) {\n\t\t\t\tTIFFError(TIFF2PDF_MODULE, "Integer overflow");\n\t\t\t\tt2p->t2p_error = T2P_ERR_ERROR;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n#endif\n\t\t(void) 0;\n\t}\n\tk = checkMultiply64(TIFFScanlineSize(input), t2p->tiff_length, t2p);\n\tif(t2p->tiff_planar==PLANARCONFIG_SEPARATE){\n\t\tk = checkMultiply64(k, t2p->tiff_samplesperpixel, t2p);\n\t}\n\tif (k == 0) {\n\t\tt2p->t2p_error = T2P_ERR_ERROR;\n\t}\n\tt2p->tiff_datasize = (tsize_t) k;\n\tif ((uint64) t2p->tiff_datasize != k) {\n\t\tTIFFError(TIFF2PDF_MODULE, "Integer overflow");\n\t\tt2p->t2p_error = T2P_ERR_ERROR;\n\t}\n\treturn;\n}', 'int\nTIFFGetField(TIFF* tif, uint32 tag, ...)\n{\n\tint status;\n\tva_list ap;\n\tva_start(ap, tag);\n\tstatus = TIFFVGetField(tif, tag, ap);\n\tva_end(ap);\n\treturn (status);\n}', 'uint32\nTIFFNumberOfStrips(TIFF* tif)\n{\n\tTIFFDirectory *td = &tif->tif_dir;\n\tuint32 nstrips;\n\tnstrips = (td->td_rowsperstrip == (uint32) -1 ? 1 :\n\t     TIFFhowmany_32(td->td_imagelength, td->td_rowsperstrip));\n\tif (td->td_planarconfig == PLANARCONFIG_SEPARATE)\n\t\tnstrips = _TIFFMultiply32(tif, nstrips, (uint32)td->td_samplesperpixel,\n\t\t    "TIFFNumberOfStrips");\n\treturn (nstrips);\n}', 'uint32\n_TIFFMultiply32(TIFF* tif, uint32 first, uint32 second, const char* where)\n{\n\tuint32 bytes = first * second;\n\tif (second && bytes / second != first) {\n\t\tTIFFErrorExt(tif->tif_clientdata, where, "Integer overflow in %s", where);\n\t\tbytes = 0;\n\t}\n\treturn bytes;\n}']