Author: markj
Date: Thu Feb 13 04:54:47 2014
New Revision: 261820
URL: http://svnweb.freebsd.org/changeset/base/261820

Log:
  MFC r257600:
  Initialize the struct tm before handing it to strptime(3).

Modified:
  stable/10/usr.sbin/newsyslog/newsyslog.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/newsyslog/newsyslog.c
==============================================================================
--- stable/10/usr.sbin/newsyslog/newsyslog.c    Thu Feb 13 04:13:50 2014        
(r261819)
+++ stable/10/usr.sbin/newsyslog/newsyslog.c    Thu Feb 13 04:54:47 2014        
(r261820)
@@ -1491,6 +1491,7 @@ validate_old_timelog(int fd, const struc
                            &dp->d_name[logfname_len]);
                return (0);
        }
+       memset(tm, 0, sizeof(*tm));
        if ((s = strptime(&dp->d_name[logfname_len + 1],
            timefnamefmt, tm)) == NULL) {
                /*
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to