From: Juergen Perlinger Date: Wed, 11 Apr 2018 05:59:51 +0000 (+0200) Subject: [Bug 3485] Undefined sockaddr used in error messages in ntp_config.c X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e9e8865e2d2f59096efa511ac5a8d0eb66f2528;p=thirdparty%2Fntp.git [Bug 3485] Undefined sockaddr used in error messages in ntp_config.c bk: 5acda457xM-KveWTlE5JHBJOthLr4Q --- diff --git a/ChangeLog b/ChangeLog index fefc2bf5f..c334512ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ --- +* [Bug 3485] Undefined sockaddr used in error messages in ntp_config.c + - applied patch by Gerry Garvey * [Bug 3480] Refclock sample filter not cleared on clock STEP - applied patch by Gerry Garvey * [Bug 3479] ctl_putrefid() allows unsafe characters through to ntpq diff --git a/ntpd/ntp_config.c b/ntpd/ntp_config.c index f3c283cb6..58f8102ee 100644 --- a/ntpd/ntp_config.c +++ b/ntpd/ntp_config.c @@ -3626,10 +3626,8 @@ config_fudge( err_flag = 1; msyslog(LOG_ERR, "unrecognized fudge reference clock address %s, line ignored", - stoa(&addr_sock)); - } - - if (!ISREFCLOCKADR(&addr_sock)) { + addr_node->address); + } else if (!ISREFCLOCKADR(&addr_sock)) { err_flag = 1; msyslog(LOG_ERR, "inappropriate address %s for the fudge command, line ignored", @@ -3701,7 +3699,7 @@ config_fudge( msyslog(LOG_ERR, "Unexpected fudge flag %s (%d) for %s", token_name(curr_opt->attr), - curr_opt->attr, stoa(&addr_sock)); + curr_opt->attr, addr_node->address); exit(curr_opt->attr ? curr_opt->attr : 1); } }