]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 1753] 4.2.7p94 faults on startup in newpeer(), strdup(NULL).
authorDave Hart <hart@ntp.org>
Wed, 15 Dec 2010 19:01:12 +0000 (19:01 +0000)
committerDave Hart <hart@ntp.org>
Wed, 15 Dec 2010 19:01:12 +0000 (19:01 +0000)
bk: 4d091078qXHHQRYvho552ksDdbH2xA

ChangeLog
ntpd/ntp_peer.c

index afc17eddc398a1084c4355dff3d74931002f6238..e53c3b10f89751fa4662bde830c409dd97df1bbf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+* [Bug 1753] 4.2.7p94 faults on startup in newpeer(), strdup(NULL).
 (4.2.7p94) 2010/12/15 Released by Harlan Stenn <stenn@ntp.org>
 * [Bug 1751] from 4.2.6p3-RC12: Support for Atari FreeMiNT OS.
 * Documentation updates from Dave Mills.
index 9eeec21c17b2e4ab06a7ab67a4d387171cec962f..e2e0841cc5d07393c2eb6d27626badeb58318214 100644 (file)
@@ -897,7 +897,8 @@ newpeer(
 #endif /* AUTOKEY */
        peer->ttl = (u_char)ttl;
        peer->keyid = key;
-       peer->ident = estrdup(group);
+       if (NULL != group)
+               peer->ident = estrdup(group);
        peer->precision = sys_precision;
        peer->hpoll = peer->minpoll;
        if (cast_flags & MDF_ACAST)