]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 1120] [CID 51] INSIST that peer is non-null before we dereference it
authorHarlan Stenn <stenn@ntp.org>
Mon, 19 Jan 2009 08:41:10 +0000 (03:41 -0500)
committerHarlan Stenn <stenn@ntp.org>
Mon, 19 Jan 2009 08:41:10 +0000 (03:41 -0500)
bk: 49743ca6i9GtHDeJ1sNgLAQPsx9jhg

ChangeLog
ntpd/ntp_control.c

index db7a623e97efb82146368243ae1ae255bc7b047a..12da4d993bb9b38b216e876ed2fcd1732db1ed66 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+* [Bug 1120] [CID 51] INSIST that peer is non-null before we dereference it.
 * [Bug 1121] [CID 47] double fclose() in ntp-keygen.c.
 (4.2.5p155) 2009/01/18 Released by Harlan Stenn <stenn@ntp.org>
 * Documentation updates from Dave Mills.
index 40138e24aae83b1a5696a30fa43f99f5165473e9..4c7d0991372a7e313799856cbf6978811ddc3163 100644 (file)
@@ -13,6 +13,7 @@
 #include "ntp_unixtime.h"
 #include "ntp_stdlib.h"
 #include "ntp_config.h"
+#include "ntp_assert.h"
 
 #include <stdio.h>
 #include <ctype.h>
@@ -2866,6 +2867,7 @@ report_event(
                        ctl_putsys(i);
                }
        } else {
+               NTP_INSIST(peer != NULL);
                rpkt.associd = htons(peer->associd);
                rpkt.status = htons(ctlpeerstatus(peer));