From: Matthijs Mekking Date: Fri, 31 Jul 2020 06:52:05 +0000 (+0200) Subject: Fix time printing in key files X-Git-Tag: v9.17.5~63^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3eb55fd1c2638c64ea802804e90b2917beed532;p=thirdparty%2Fbind9.git Fix time printing in key files 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. --- diff --git a/lib/dns/dst_api.c b/lib/dns/dst_api.c index f9cf22ec5d9..c1bbcb93201 100644 --- a/lib/dns/dst_api.c +++ b/lib/dns/dst_api.c @@ -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: