source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Catch localtime() failure for additional safety; patch from Jan
@ 2014-12-15 17:30 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-12-15 17:30 UTC (permalink / raw)
  To: source

Log Message:
-----------
Catch localtime() failure for additional safety;
patch from Jan Stary <hans at stare dot cz> some time ago.

Modified Files:
--------------
    mdocml:
        mandoc.c

Revision Data
-------------
Index: mandoc.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mandoc.c,v
retrieving revision 1.88
retrieving revision 1.89
diff -Lmandoc.c -Lmandoc.c -u -p -r1.88 -r1.89
--- mandoc.c
+++ mandoc.c
@@ -480,6 +480,8 @@ time2a(time_t t)
 	int		 isz;
 
 	tm = localtime(&t);
+	if (tm == NULL)
+		return(NULL);
 
 	/*
 	 * Reserve space:
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-12-15 17:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-15 17:30 mdocml: Catch localtime() failure for additional safety; patch from Jan schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).