Patch in trailing nul character to print just the length label (for various cases below)

This commit is contained in:
Mukund Sivaraman
2018-05-12 08:20:57 +05:30
committed by Mark Andrews
parent 16a67911d8
commit 6a756ab654

View File

@@ -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);