]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Fix from Dave Mills for a rare singularity in clock_combine()
authorHarlan Stenn <stenn@ntp.org>
Sun, 24 Oct 2010 07:28:33 +0000 (03:28 -0400)
committerHarlan Stenn <stenn@ntp.org>
Sun, 24 Oct 2010 07:28:33 +0000 (03:28 -0400)
bk: 4cc3e021hOdjmdgNqvOh-DXCPVNmhA

ChangeLog
ntpd/ntp_proto.c

index 91655387e2a6ec2b615e6082df2dd33ea56f27ef..a3e7ec994548916dffb1b9c110a0967caee20ed2 100644 (file)
--- 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 <stenn@ntp.org>
 * [Bug 1671] Automatic delay calibration is sometimes inaccurate.
 (4.2.7p68) 2010/10/22 Released by Harlan Stenn <stenn@ntp.org>
index 7c9e414ba81f54f2ae88ac52b2c1ba8de043882c..b172da427180d14a946af40de93f5b24914c7494 100644 (file)
@@ -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;