]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 3430] ntpq dumps core (SIGSEGV) for "keytype md2"
authorJuergen Perlinger <perlinger@ntp.org>
Thu, 7 Sep 2017 13:44:14 +0000 (15:44 +0200)
committerJuergen Perlinger <perlinger@ntp.org>
Thu, 7 Sep 2017 13:44:14 +0000 (15:44 +0200)
 - side kick: missing linefeed in 'ifstat' warning messes up screen

bk: 59b14d2e-xIkyfGpKuShlhkO8hDsSw

ntpq/ntpq-subs.c

index 08f9d426a4a476c15ff0d9c250414c48e0e8d650..de8062cd9e036940231b76747ab1f2e6f1b943c4 100644 (file)
@@ -3277,7 +3277,7 @@ validate_ifnum(
                return;
        if (prow->ifnum + 1 <= ifnum) {
                if (*pfields < IFSTATS_FIELDS)
-                       fprintf(fp, "Warning: incomplete row with %d (of %d) fields",
+                       fprintf(fp, "Warning: incomplete row with %d (of %d) fields\n",
                                *pfields, IFSTATS_FIELDS);
                *pfields = 0;
                prow->ifnum = ifnum;
@@ -3472,7 +3472,7 @@ ifstats(
                }
        }
        if (fields != IFSTATS_FIELDS)
-               fprintf(fp, "Warning: incomplete row with %d (of %d) fields",
+               fprintf(fp, "Warning: incomplete row with %d (of %d) fields\n",
                        fields, IFSTATS_FIELDS);
 
        fflush(fp);