diff options
author | markj <markj@FreeBSD.org> | 2013-11-04 02:50:43 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2013-11-04 02:50:43 +0000 |
commit | cce38458350be2a85af7d032ebf800cc009a9ab8 (patch) | |
tree | 02cf474266feff3a7438c139017e29213081dd8d /usr.sbin/newsyslog | |
parent | 7493efdad548a18ee5806e1200432f17e17738e6 (diff) | |
download | FreeBSD-src-cce38458350be2a85af7d032ebf800cc009a9ab8.zip FreeBSD-src-cce38458350be2a85af7d032ebf800cc009a9ab8.tar.gz |
Initialize the struct tm before handing it to strptime(3).
PR: 183550
MFC after: 2 weeks
Diffstat (limited to 'usr.sbin/newsyslog')
-rw-r--r-- | usr.sbin/newsyslog/newsyslog.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c index 69a63c4..66856d2 100644 --- a/usr.sbin/newsyslog/newsyslog.c +++ b/usr.sbin/newsyslog/newsyslog.c @@ -1491,6 +1491,7 @@ validate_old_timelog(int fd, const struct dirent *dp, const char *logfname, &dp->d_name[logfname_len]); return (0); } + memset(tm, 0, sizeof(*tm)); if ((s = strptime(&dp->d_name[logfname_len + 1], timefnamefmt, tm)) == NULL) { /* |