Initialize the struct tm before handing it to strptime(3).

PR:		183550
MFC after:	2 weeks
This commit is contained in:
Mark Johnston 2013-11-04 02:50:43 +00:00
parent cc085ba84d
commit de6d612a0e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=257600

View File

@ -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) {
/*