diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c index 69a63c4c5fe5..66856d23a909 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) { /*