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
de97098080
commit
c9cf794454
@ -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 New Issue
Block a user