diff options
author | markj <markj@FreeBSD.org> | 2014-02-13 04:54:47 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2014-02-13 04:54:47 +0000 |
commit | 2a0c06b06734af87b60753f6646870c393aeb126 (patch) | |
tree | a38ef707284d5f5122fc38da3b31d661003d8bf2 /usr.sbin | |
parent | b7969843d1787507419cfba9cb55e6ac13055fd9 (diff) | |
download | FreeBSD-src-2a0c06b06734af87b60753f6646870c393aeb126.zip FreeBSD-src-2a0c06b06734af87b60753f6646870c393aeb126.tar.gz |
MFC r257600:
Initialize the struct tm before handing it to strptime(3).
Diffstat (limited to 'usr.sbin')
-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) { /* |