tools/tiff2pdf.c:4244: error: Null Dereference
  pointer `currenttime` last assigned on line 4241 could be null and is dereferenced at line 4244, column 5.

tools/tiff2pdf.c:4230:1: start of procedure t2p_pdf_currenttime()
4228.  */
4229. 
4230. void t2p_pdf_currenttime(T2P* t2p)
      ^
4231. {
4232. 	struct tm* currenttime;

tools/tiff2pdf.c:4235:6: Taking true branch
4233. 	time_t timenow;
4234. 
4235. 	if (time(&timenow) == (time_t) -1) {
           ^
4236. 		TIFFError(TIFF2PDF_MODULE,
4237. 			  "Can't get the current time: %s", strerror(errno));

tools/tiff2pdf.c:4236:3: Skipping strerror(): method has no implementation
4234. 
4235. 	if (time(&timenow) == (time_t) -1) {
4236. 		TIFFError(TIFF2PDF_MODULE,
        ^
4237. 			  "Can't get the current time: %s", strerror(errno));
4238. 		timenow = (time_t) 0;

libtiff/tif_error.c:48:1: start of procedure TIFFError()
  46. }
  47. 
  48. void
      ^
  49. TIFFError(const char* module, const char* fmt, ...)
  50. {

libtiff/tif_error.c:52:6: Taking true branch
  50. {
  51. 	va_list ap;
  52. 	if (_TIFFerrorHandler) {
           ^
  53. 		va_start(ap, fmt);	
  54. 		(*_TIFFerrorHandler)(module, fmt, ap);

libtiff/tif_error.c:53:3: 
  51. 	va_list ap;
  52. 	if (_TIFFerrorHandler) {
  53. 		va_start(ap, fmt);	
        ^
  54. 		(*_TIFFerrorHandler)(module, fmt, ap);
  55. 		va_end(ap);

libtiff/tif_error.c:54:3: Skipping __function_pointer__(): unresolved function pointer
  52. 	if (_TIFFerrorHandler) {
  53. 		va_start(ap, fmt);	
  54. 		(*_TIFFerrorHandler)(module, fmt, ap);
        ^
  55. 		va_end(ap);
  56. 	}

libtiff/tif_error.c:55:3: 
  53. 		va_start(ap, fmt);	
  54. 		(*_TIFFerrorHandler)(module, fmt, ap);
  55. 		va_end(ap);
        ^
  56. 	}
  57. 	if (_TIFFerrorHandlerExt) {

libtiff/tif_error.c:57:6: Taking true branch
  55. 		va_end(ap);
  56. 	}
  57. 	if (_TIFFerrorHandlerExt) {
           ^
  58. 		va_start(ap, fmt);
  59. 		(*_TIFFerrorHandlerExt)(0, module, fmt, ap);

libtiff/tif_error.c:58:3: 
  56. 	}
  57. 	if (_TIFFerrorHandlerExt) {
  58. 		va_start(ap, fmt);
        ^
  59. 		(*_TIFFerrorHandlerExt)(0, module, fmt, ap);
  60. 		va_end(ap);

libtiff/tif_error.c:59:3: Skipping __function_pointer__(): unresolved function pointer
  57. 	if (_TIFFerrorHandlerExt) {
  58. 		va_start(ap, fmt);
  59. 		(*_TIFFerrorHandlerExt)(0, module, fmt, ap);
        ^
  60. 		va_end(ap);
  61. 	}

libtiff/tif_error.c:60:3: 
  58. 		va_start(ap, fmt);
  59. 		(*_TIFFerrorHandlerExt)(0, module, fmt, ap);
  60. 		va_end(ap);
        ^
  61. 	}
  62. }

libtiff/tif_error.c:57:2: 
  55. 		va_end(ap);
  56. 	}
  57. 	if (_TIFFerrorHandlerExt) {
       ^
  58. 		va_start(ap, fmt);
  59. 		(*_TIFFerrorHandlerExt)(0, module, fmt, ap);

libtiff/tif_error.c:62:1: return from a call to TIFFError
  60. 		va_end(ap);
  61. 	}
  62. }
      ^
  63. 
  64. void

tools/tiff2pdf.c:4238:3: 
4236. 		TIFFError(TIFF2PDF_MODULE,
4237. 			  "Can't get the current time: %s", strerror(errno));
4238. 		timenow = (time_t) 0;
        ^
4239. 	}
4240. 

tools/tiff2pdf.c:4241:2: 
4239. 	}
4240. 
4241. 	currenttime = localtime(&timenow);
       ^
4242. 	snprintf(t2p->pdf_datetime, sizeof(t2p->pdf_datetime),
4243. 		 "D:%.4d%.2d%.2d%.2d%.2d%.2d",

tools/tiff2pdf.c:4242:2: 
4240. 
4241. 	currenttime = localtime(&timenow);
4242. 	snprintf(t2p->pdf_datetime, sizeof(t2p->pdf_datetime),
       ^
4243. 		 "D:%.4d%.2d%.2d%.2d%.2d%.2d",
4244. 		 (currenttime->tm_year + 1900) % 65536,
