]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Sec 3046] CRYPTO_NAK crash
authorHarlan Stenn <stenn@ntp.org>
Fri, 6 May 2016 11:05:44 +0000 (11:05 +0000)
committerHarlan Stenn <stenn@ntp.org>
Fri, 6 May 2016 11:05:44 +0000 (11:05 +0000)
bk: 572c7a881G8Mqw6feeglN3B9eIZ-HQ

ChangeLog
ntpd/ntp_proto.c

index 7602cd5cdfbd731d60a6a13981ac4a10fbe1fc66..dc7b627a61e8569eba246199c91e011e83f814a5 100644 (file)
--- 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
index 713a0c20dfa565e1ced2319cd628db8c16e79f93..4b50f5ae2c34b9f583c62b96b5419f3b3306f6d6 100644 (file)
@@ -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 {