]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Bug 3767: An OOB KoD RATE value triggers an assertion when debug is enabled.
authorHarlan Stenn <stenn@ntp.org>
Sat, 6 May 2023 11:34:11 +0000 (06:34 -0500)
committerHarlan Stenn <stenn@ntp.org>
Sat, 6 May 2023 11:34:11 +0000 (06:34 -0500)
bk: 64563b33HAzuFQbf88wBrgLNRvnTcg

ChangeLog
configure.ac
ntpd/ntp_config.c

index 3d2f817b5f6a9d4b40fc850a91f8a9b2f21ec33a..cfd187332565844b97e67c064287a04975904b8a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,11 +1,13 @@
 ---
-* [Bug 3814] First poll delay of new or cleared associations miscalculated.
-             <hart@ntp.org>
 * [Sec 3808] Assertion failure in ntpq on malformed RT-11 date <perlinger@ntp.org>
 * [Sec 3807] praecis_parse() in the Palisade refclock driver has a
              hypothetical input buffer overflow. Reported by ... stenn@
 * [Sec 3806] libntp/mstolfp.c needs bounds checking <perlinger@ntp.org>
   - solved numerically instead of using string manipulation
+* [Sec 3767] An OOB KoD RATE value triggers an assertion when debug is enabled.
+             <stenn@ntp.org>
+* [Bug 3814] First poll delay of new or cleared associations miscalculated.
+             <hart@ntp.org>
 * [Bug 3802] ntp-keygen -I default identity modulus bits too small for
              OpenSSL 3.  Reported by rmsh1216@163.com <hart@ntp.org>
 * [Bug 3801] gpsdjson refclock gps_open() device name mishandled. <hart@ntp.org>
index 4bdda1da6963c74b717bc74fce656e4af90f8c4b..c2dce35e800d16b11dbad7158e5c068588750b78 100644 (file)
@@ -4208,6 +4208,24 @@ case "$ans" in
 esac
 
 
+AC_MSG_CHECKING([if we want a debug assert on an OOB KoD RATE value])
+AC_ARG_ENABLE(
+    [bug3767-fix],
+    [AS_HELP_STRING(
+       [--enable-bug3767-fix],
+       [+ Disable debug assertion on OOB KoD RATE value]
+    )],
+    [ans=$enableval],
+    [ans=yes]
+)
+AC_MSG_RESULT([$ans])
+case "$ans" in
+ no)
+    AC_DEFINE([DISABLE_BUG3767_FIX], [1],
+       [Disable debug assertion on OOB KoD RATE value?])
+esac
+
+
 AC_MSG_CHECKING([if we should use the IRIG sawtooth filter])
 
 case "$host" in
index 96e0c5dda5d5e0f4da77126ffa980184ba6f8370..008cfdbbcd9b7207c01b85493d406e7303a8ccf5 100644 (file)
@@ -3082,7 +3082,9 @@ get_pollskew(
        )
 {
 
+#ifdef DISABLE_BUG3767_FIX
        DEBUG_INSIST(3 <= p && 17 >= p);
+#endif
        if (3 <= p && 17 >= p) {
                *rv = psl[p - 3];