]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 3476] ctl_putstr() sends empty unquoted string if data is Null / zero length
authorJuergen Perlinger <perlinger@ntp.org>
Wed, 11 Apr 2018 05:39:36 +0000 (07:39 +0200)
committerJuergen Perlinger <perlinger@ntp.org>
Wed, 11 Apr 2018 05:39:36 +0000 (07:39 +0200)
bk: 5acd9f98PEhaMtDxbyBJEhX43OGQXg

ChangeLog
ntpd/ntp_control.c

index e8f1b22969df32e983004ddb6551fb1c4afe49f3..fefc2bf5fa2857a91fea58776c75a58b409566e3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,8 @@
   - applied patch by Gerry Garvey
 * [Bug 3479] ctl_putrefid() allows unsafe characters through to ntpq <perlinger@ntp.org>
   - applied patch by Gerry Garvey (with mods)
+* [Bug 3476]ctl_putstr() sends empty unquoted string [...] <perlinger@ntp.org>
+  - 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 <perlinger@ntp.org>
   - applied patch by Gerry Garvey
 * [Bug 3471] Check for openssl/[ch]mac.h.  HStenn.
index faa0751c8ccad0bed534f3770fe1e1d074b13a77..797e850c2e141542cdfe9ad22a3f77aa8233814f 100644 (file)
@@ -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);
        }
 }