svn commit: r257600 - head/usr.sbin/newsyslog

Mark Johnston markj at FreeBSD.org
Mon Nov 4 02:50:43 UTC 2013


Author: markj
Date: Mon Nov  4 02:50:43 2013
New Revision: 257600
URL: http://svnweb.freebsd.org/changeset/base/257600

Log:
  Initialize the struct tm before handing it to strptime(3).
  
  PR:		183550
  MFC after:	2 weeks

Modified:
  head/usr.sbin/newsyslog/newsyslog.c

Modified: head/usr.sbin/newsyslog/newsyslog.c
==============================================================================
--- head/usr.sbin/newsyslog/newsyslog.c	Mon Nov  4 00:33:30 2013	(r257599)
+++ head/usr.sbin/newsyslog/newsyslog.c	Mon Nov  4 02:50:43 2013	(r257600)
@@ -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) {
 		/*


More information about the svn-src-head mailing list