diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-12-15 17:30:30 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-12-15 17:30:30 +0000 |
commit | e6b080f3a27c56f233170a65580fb5d2f5a9841c (patch) | |
tree | 178666e4748c9d39116ea2d024f45590bec8621f | |
parent | 812f665d4bac40245447d88e6f1542df89108629 (diff) | |
download | mandoc-e6b080f3a27c56f233170a65580fb5d2f5a9841c.tar.gz |
Catch localtime() failure for additional safety;
patch from Jan Stary <hans at stare dot cz> some time ago.
-rw-r--r-- | mandoc.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -480,6 +480,8 @@ time2a(time_t t) int isz; tm = localtime(&t); + if (tm == NULL) + return(NULL); /* * Reserve space: |