artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b067e28
)
Catch localtime() failure for additional safety;
author
schwarze
<schwarze@openbsd.org>
Mon, 15 Dec 2014 17:29:58 +0000
(17:29 +0000)
committer
schwarze
<schwarze@openbsd.org>
Mon, 15 Dec 2014 17:29:58 +0000
(17:29 +0000)
patch from Jan Stary <hans at stare dot cz> some time ago.
usr.bin/mandoc/mandoc.c
patch
|
blob
|
history
diff --git
a/usr.bin/mandoc/mandoc.c
b/usr.bin/mandoc/mandoc.c
index
45793f1
..
16c4f02
100644
(file)
--- a/
usr.bin/mandoc/mandoc.c
+++ b/
usr.bin/mandoc/mandoc.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: mandoc.c,v 1.5
6 2014/11/28 19:25:03
schwarze Exp $ */
+/* $OpenBSD: mandoc.c,v 1.5
7 2014/12/15 17:29:58
schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@
-475,6
+475,8
@@
time2a(time_t t)
int isz;
tm = localtime(&t);
+ if (tm == NULL)
+ return(NULL);
/*
* Reserve space: