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

tools/tiff2pdf.c:4173:1: start of procedure t2p_pdf_currenttime()
4171.  */
4172. 
4173. void t2p_pdf_currenttime(T2P* t2p)
      ^
4174. {
4175. 	struct tm* currenttime;

tools/tiff2pdf.c:4178:6: Taking true branch
4176. 	time_t timenow;
4177. 
4178. 	if (time(&timenow) == (time_t) -1) {
           ^
4179. 		TIFFError(TIFF2PDF_MODULE,
4180. 			  "Can't get the current time: %s", strerror(errno));

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

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

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

libtiff/tif_error.c:55:6: Taking true branch
  53. 	va_list ap;
  54. 	va_start(ap, fmt);
  55. 	if (_TIFFerrorHandler)
           ^
  56. 		(*_TIFFerrorHandler)(module, fmt, ap);
  57. 	if (_TIFFerrorHandlerExt)

libtiff/tif_error.c:56:3: Skipping __function_pointer__(): unresolved function pointer
  54. 	va_start(ap, fmt);
  55. 	if (_TIFFerrorHandler)
  56. 		(*_TIFFerrorHandler)(module, fmt, ap);
        ^
  57. 	if (_TIFFerrorHandlerExt)
  58. 		(*_TIFFerrorHandlerExt)(0, module, fmt, ap);

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

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

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

libtiff/tif_error.c:60:1: return from a call to TIFFError
  58. 		(*_TIFFerrorHandlerExt)(0, module, fmt, ap);
  59. 	va_end(ap);
  60. }
      ^
  61. 
  62. void

tools/tiff2pdf.c:4181:3: 
4179. 		TIFFError(TIFF2PDF_MODULE,
4180. 			  "Can't get the current time: %s", strerror(errno));
4181. 		timenow = (time_t) 0;
        ^
4182. 	}
4183. 

tools/tiff2pdf.c:4184:2: 
4182. 	}
4183. 
4184. 	currenttime = localtime(&timenow);
       ^
4185. 	snprintf(t2p->pdf_datetime, sizeof(t2p->pdf_datetime),
4186. 		 "D:%.4d%.2d%.2d%.2d%.2d%.2d",

tools/tiff2pdf.c:4185:2: 
4183. 
4184. 	currenttime = localtime(&timenow);
4185. 	snprintf(t2p->pdf_datetime, sizeof(t2p->pdf_datetime),
       ^
4186. 		 "D:%.4d%.2d%.2d%.2d%.2d%.2d",
4187. 		 (currenttime->tm_year + 1900) % 65536,
