From 6a756ab65462477abe955106d06daedc4c64cb9e Mon Sep 17 00:00:00 2001 From: Mukund Sivaraman Date: Sat, 12 May 2018 08:20:57 +0530 Subject: [PATCH] Patch in trailing nul character to print just the length label (for various cases below) --- lib/dns/rpz.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/dns/rpz.c b/lib/dns/rpz.c index 74b70092c9..f104384f7a 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);