From: Mukund Sivaraman Date: Sat, 12 May 2018 02:50:57 +0000 (+0530) Subject: Patch in trailing nul character to print just the length label (for various cases... X-Git-Tag: v9.13.2~21^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6a756ab65462477abe955106d06daedc4c64cb9e;p=thirdparty%2Fbind9.git Patch in trailing nul character to print just the length label (for various cases below) --- diff --git a/lib/dns/rpz.c b/lib/dns/rpz.c index 74b70092c9f..f104384f7ad 100644 --- a/lib/dns/rpz.c +++ b/lib/dns/rpz.c @@ -849,6 +849,11 @@ name2ipkey(int log_level, "; invalid leading prefix length", ""); return (ISC_R_FAILURE); } + /* + * Patch in trailing nul character to print just the length + * label (for various cases below). + */ + *cp2 = '\0'; if (prefix_num < 1U || prefix_num > 128U) { badname(log_level, src_name, "; invalid prefix length of ", prefix_str);