From: Harlan Stenn Date: Mon, 19 Jan 2009 08:41:10 +0000 (-0500) Subject: [Bug 1120] [CID 51] INSIST that peer is non-null before we dereference it X-Git-Tag: NTP_4_2_5P156~1^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=720e7ec5f010f2bf8f01bb59f981921ef70f991a;p=thirdparty%2Fntp.git [Bug 1120] [CID 51] INSIST that peer is non-null before we dereference it bk: 49743ca6i9GtHDeJ1sNgLAQPsx9jhg --- diff --git a/ChangeLog b/ChangeLog index db7a623e9..12da4d993 100644 --- 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 * Documentation updates from Dave Mills. diff --git a/ntpd/ntp_control.c b/ntpd/ntp_control.c index 40138e24a..4c7d09913 100644 --- a/ntpd/ntp_control.c +++ b/ntpd/ntp_control.c @@ -13,6 +13,7 @@ #include "ntp_unixtime.h" #include "ntp_stdlib.h" #include "ntp_config.h" +#include "ntp_assert.h" #include #include @@ -2866,6 +2867,7 @@ report_event( ctl_putsys(i); } } else { + NTP_INSIST(peer != NULL); rpkt.associd = htons(peer->associd); rpkt.status = htons(ctlpeerstatus(peer));