From: Harlan Stenn Date: Sun, 24 Oct 2010 07:28:33 +0000 (-0400) Subject: Fix from Dave Mills for a rare singularity in clock_combine() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1048357c9bd998f3acebd2cd01c5a6895d7ad5c2;p=thirdparty%2Fntp.git Fix from Dave Mills for a rare singularity in clock_combine() bk: 4cc3e021hOdjmdgNqvOh-DXCPVNmhA --- diff --git a/ChangeLog b/ChangeLog index 91655387e2..a3e7ec9945 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ * [Bug 1675] from 4.2.6p3-RC6: Prohibit includefile remote config. * Enable generating ntpd/ntp_keyword.h after keyword-gen.c changes on Windows as well as POSIX platforms. +* Fix from Dave Mills for a rare singularity in clock_combine(). (4.2.7p69) 2010/10/23 Released by Harlan Stenn * [Bug 1671] Automatic delay calibration is sometimes inaccurate. (4.2.7p68) 2010/10/22 Released by Harlan Stenn diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c index 7c9e414ba8..b172da4271 100644 --- a/ntpd/ntp_proto.c +++ b/ntpd/ntp_proto.c @@ -2783,7 +2783,7 @@ clock_combine( y = z = w = 0; for (i = 0; i < npeers; i++) { - x = max(sys_maxdist - root_distance(peers[i]), 0); + x = max(sys_maxdist - root_distance(peers[i]), sys_mindisp); y += x; z += peers[i]->offset * x; w += SQUARE(peers[i]->offset - peers[0]->offset) * x;