From: Mukund Sivaraman Date: Thu, 19 May 2016 11:38:51 +0000 (+0530) Subject: Don't use %z format specifier that caused crash with rndc stats on some Visual Studio... X-Git-Tag: v9.11.0a2~7 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=7472cd350fe9245553e9da7f2df8e7e364d136ab;p=thirdparty%2Fbind9.git Don't use %z format specifier that caused crash with rndc stats on some Visual Studio builds --- diff --git a/CHANGES b/CHANGES index 7b62f7a3062..335d9c2bd9f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +4368. [bug] Fix a crash when calling "rndc stats" on some + Windows builds because some Visual Studio compilers + generated crashing code for the "%z" printf() + format specifier. [RT #42380] + --- 9.11.0a1 released --- 4367. [bug] Remove unnecessary assignment of loadtime in diff --git a/lib/dns/cache.c b/lib/dns/cache.c index a21dda546a8..6bf6a92efbf 100644 --- a/lib/dns/cache.c +++ b/lib/dns/cache.c @@ -1416,7 +1416,8 @@ dns_cache_dumpstats(dns_cache_t *cache, FILE *fp) { "cache records deleted due to TTL expiration"); fprintf(fp, "%20u %s\n", dns_db_nodecount(cache->db), "cache database nodes"); - fprintf(fp, "%20zu %s\n", dns_db_hashsize(cache->db), + fprintf(fp, "%20" ISC_PLATFORM_QUADFORMAT "u %s\n", + (isc_uint64_t) dns_db_hashsize(cache->db), "cache database hash buckets"); fprintf(fp, "%20u %s\n", (unsigned int) isc_mem_total(cache->mctx),