summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--contrib/isc-dhcp/common/options.c10
-rw-r--r--contrib/isc-dhcp/includes/version.h2
2 files changed, 8 insertions, 4 deletions
diff --git a/contrib/isc-dhcp/common/options.c b/contrib/isc-dhcp/common/options.c
index b80ffa1..b840716 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 303fbfa..45b89ff 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"
OpenPOWER on IntegriCloud