]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix time printing in key files
authorMatthijs Mekking <matthijs@isc.org>
Fri, 31 Jul 2020 06:52:05 +0000 (08:52 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Fri, 7 Aug 2020 09:26:09 +0000 (11:26 +0200)
Don't strip off the final character when printing times in key files.

With the introduction of 'rndc dnssec -status' we introduced
'isc_stdtime_tostring()'. This changed in behavior such that it was no
longer needed to strip of the final '\n' of the string format
datetime. However, in 'printtime()' it still stripped the final
character.

lib/dns/dst_api.c

index f9cf22ec5d9fa2ef8d49b2e4034dd99d5c9f664f..c1bbcb932012e0af62bb4fb9ab590b71da5f73a0 100644 (file)
@@ -1925,8 +1925,7 @@ printtime(const dst_key_t *key, int type, const char *tag, FILE *stream) {
        }
 
        isc_buffer_usedregion(&b, &r);
-       fprintf(stream, "%s: %.*s (%.*s)\n", tag, (int)r.length, r.base,
-               (int)strlen(output) - 1, output);
+       fprintf(stream, "%s: %.*s (%s)\n", tag, (int)r.length, r.base, output);
        return;
 
 error: