diff --git a/contrib/isc-dhcp/common/options.c b/contrib/isc-dhcp/common/options.c index b80ffa1fb47e..b840716f345a 100644 --- a/contrib/isc-dhcp/common/options.c +++ b/contrib/isc-dhcp/common/options.c @@ -553,9 +553,13 @@ char *pretty_print_option (code, data, len, emit_commas, emit_quotes) for (; dp < data + len; dp++) { if (!isascii (*dp) || !isprint (*dp)) { - sprintf (op, "\\%03o", - *dp); - op += 4; + /* Skip trailing NUL. */ + if (dp + 1 != data + len || + *dp != 0) { + sprintf (op, "\\%03o", + *dp); + op += 4; + } } else if (*dp == '"' || *dp == '\'' || *dp == '$' || diff --git a/contrib/isc-dhcp/includes/version.h b/contrib/isc-dhcp/includes/version.h index 303fbfa332be..45b89ff897e1 100644 --- a/contrib/isc-dhcp/includes/version.h +++ b/contrib/isc-dhcp/includes/version.h @@ -1,3 +1,3 @@ /* Current version of ISC DHCP Distribution. */ -#define DHCP_VERSION "2.0pl5" +#define DHCP_VERSION "2.0pl5+v3_fixes"