Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Feb 2014 04:55:46 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r261822 - stable/8/usr.sbin/newsyslog
Message-ID:  <201402130455.s1D4tkiD074168@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Thu Feb 13 04:55:46 2014
New Revision: 261822
URL: http://svnweb.freebsd.org/changeset/base/261822

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

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

Modified: stable/8/usr.sbin/newsyslog/newsyslog.c
==============================================================================
--- stable/8/usr.sbin/newsyslog/newsyslog.c	Thu Feb 13 04:55:18 2014	(r261821)
+++ stable/8/usr.sbin/newsyslog/newsyslog.c	Thu Feb 13 04:55:46 2014	(r261822)
@@ -1486,6 +1486,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) {
 		/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402130455.s1D4tkiD074168>