summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/ntpd/ntp_timer.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2016-01-22 07:32:39 +0000
committerdelphij <delphij@FreeBSD.org>2016-01-22 07:32:39 +0000
commit51765b7c6f50b7a90576344f7623019de4f88d5d (patch)
tree99811aace67dff7ddd2c157e5659a28d88a3405b /contrib/ntp/ntpd/ntp_timer.c
parent3e83d3a20344f0535767a5d9cb110d3e9571c049 (diff)
parenta835b8ff526b5ef2c37fdb4f48180c215f58bb53 (diff)
downloadFreeBSD-src-51765b7c6f50b7a90576344f7623019de4f88d5d.zip
FreeBSD-src-51765b7c6f50b7a90576344f7623019de4f88d5d.tar.gz
MFV r294491: ntp 4.2.8p6.
Security: CVE-2015-7973, CVE-2015-7974, CVE-2015-7975 Security: CVE-2015-7976, CVE-2015-7977, CVE-2015-7978 Security: CVE-2015-7979, CVE-2015-8138, CVE-2015-8139 Security: CVE-2015-8140, CVE-2015-8158 With hat: so
Diffstat (limited to 'contrib/ntp/ntpd/ntp_timer.c')
-rw-r--r--contrib/ntp/ntpd/ntp_timer.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/contrib/ntp/ntpd/ntp_timer.c b/contrib/ntp/ntpd/ntp_timer.c
index 03084a3..78c81b6 100644
--- a/contrib/ntp/ntpd/ntp_timer.c
+++ b/contrib/ntp/ntpd/ntp_timer.c
@@ -549,14 +549,16 @@ check_leapsec(
#ifdef LEAP_SMEAR
leap_smear.enabled = leap_smear_intv != 0;
#endif
- if (reset) {
+ if (reset) {
lsprox = LSPROX_NOWARN;
leapsec_reset_frame();
memset(&lsdata, 0, sizeof(lsdata));
} else {
- int fired = leapsec_query(&lsdata, now, tpiv);
+ int fired;
- DPRINTF(1, ("*** leapsec_query: fired %i, now %u (0x%08X), tai_diff %i, ddist %u\n",
+ fired = leapsec_query(&lsdata, now, tpiv);
+
+ DPRINTF(3, ("*** leapsec_query: fired %i, now %u (0x%08X), tai_diff %i, ddist %u\n",
fired, now, now, lsdata.tai_diff, lsdata.ddist));
#ifdef LEAP_SMEAR
@@ -572,8 +574,7 @@ check_leapsec(
DPRINTF(1, ("*** leapsec_query: setting leap_smear interval %li, begin %.0f, end %.0f\n",
leap_smear.interval, leap_smear.intv_start, leap_smear.intv_end));
}
- }
- else {
+ } else {
if (leap_smear.interval)
DPRINTF(1, ("*** leapsec_query: clearing leap_smear interval\n"));
leap_smear.interval = 0;
@@ -655,10 +656,10 @@ check_leapsec(
sys_tai = lsdata.tai_offs;
} else {
#ifdef AUTOKEY
- update_autokey = (sys_tai != lsdata.tai_offs);
+ update_autokey = (sys_tai != (u_int)lsdata.tai_offs);
#endif
- lsprox = lsdata.proximity;
- sys_tai = lsdata.tai_offs;
+ lsprox = lsdata.proximity;
+ sys_tai = lsdata.tai_offs;
}
}
OpenPOWER on IntegriCloud