From: Juergen Perlinger Date: Wed, 11 Apr 2018 05:39:36 +0000 (+0200) Subject: [Bug 3476] ctl_putstr() sends empty unquoted string if data is Null / zero length X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ad4311ccdf54d5cf9d71125dd96f19d4434881d;p=thirdparty%2Fntp.git [Bug 3476] ctl_putstr() sends empty unquoted string if data is Null / zero length bk: 5acd9f98PEhaMtDxbyBJEhX43OGQXg --- diff --git a/ChangeLog b/ChangeLog index e8f1b2296..fefc2bf5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ - applied patch by Gerry Garvey * [Bug 3479] ctl_putrefid() allows unsafe characters through to ntpq - applied patch by Gerry Garvey (with mods) +* [Bug 3476]ctl_putstr() sends empty unquoted string [...] + - applied patch by Gerry Garvey (with mods); not sure if that's bug or feature, though * [Bug 3474] Missing pmode in mode7 peer info response - applied patch by Gerry Garvey * [Bug 3471] Check for openssl/[ch]mac.h. HStenn. diff --git a/ntpd/ntp_control.c b/ntpd/ntp_control.c index faa0751c8..797e850c2 100644 --- a/ntpd/ntp_control.c +++ b/ntpd/ntp_control.c @@ -1606,7 +1606,9 @@ ctl_putstr( args[3].len = 1; ctl_putdata_ex(args, 4, FALSE); } else { - ctl_putdata_ex(args, 1, FALSE); + args[1].buf = "=\"\""; + args[1].len = 3; + ctl_putdata_ex(args, 2, FALSE); } }