Date: Mon, 4 Nov 2013 02:50:43 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257600 - head/usr.sbin/newsyslog Message-ID: <201311040250.rA42ohpf062806@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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) { /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311040250.rA42ohpf062806>