mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
Fill in ut_id. While it's not relevant to the {OLD,NEW}_TIME entries,
we shouldn't leak stack garbage into the field. Sponsored by: Netflix
This commit is contained in:
parent
62de70375f
commit
dfb1d80f64
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=328282
|
@ -301,6 +301,7 @@ setthetime(const char *fmt, const char *p, int jflag, int nflag)
|
|||
/* set the time */
|
||||
if (nflag || netsettime(tval)) {
|
||||
utx.ut_type = OLD_TIME;
|
||||
memset(utx.ut_id, 0, sizeof(utx.ut_id));
|
||||
(void)gettimeofday(&utx.ut_tv, NULL);
|
||||
pututxline(&utx);
|
||||
tv.tv_sec = tval;
|
||||
|
|
Loading…
Reference in a new issue