From e6b080f3a27c56f233170a65580fb5d2f5a9841c Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 15 Dec 2014 17:30:30 +0000 Subject: Catch localtime() failure for additional safety; patch from Jan Stary some time ago. --- mandoc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mandoc.c b/mandoc.c index f74e32a7..3ae01d66 100644 --- a/mandoc.c +++ b/mandoc.c @@ -480,6 +480,8 @@ time2a(time_t t) int isz; tm = localtime(&t); + if (tm == NULL) + return(NULL); /* * Reserve space: -- cgit