From: Harlan Stenn Date: Fri, 6 May 2016 11:05:44 +0000 (+0000) Subject: [Sec 3046] CRYPTO_NAK crash X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef830232342f9e993a45d8dd75b93a0b6699f5cd;p=thirdparty%2Fntp.git [Sec 3046] CRYPTO_NAK crash bk: 572c7a881G8Mqw6feeglN3B9eIZ-HQ --- diff --git a/ChangeLog b/ChangeLog index 7602cd5cd..dc7b627a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ --- +* [Sec 3046] CRYPTO_NAK crash. stenn@ntp.org * [Bug 3038] NTP fails to build in VS2015. perlinger@ntp.org - provide build environment - 'wint_t' and 'struct timespec' defined by VS2015 diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c index 713a0c20d..4b50f5ae2 100644 --- a/ntpd/ntp_proto.c +++ b/ntpd/ntp_proto.c @@ -320,7 +320,8 @@ valid_NAK( /* * Only valid if peer uses a key */ - if (peer->keyid > 0 || peer->flags & FLAG_SKEY) { + if ( peer + && (peer->keyid > 0 || peer->flags & FLAG_SKEY)) { return (VALIDNAK); } else {