From 7657fb140fbd218ea326d55bd3c43c4077f03d9a Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Sat, 4 Nov 2000 20:14:55 +0000 Subject: Import Patchlevel 5 of the ISC 2.0 dhcp client plus bug fixes from the beta ISC DHCP version 3 offering. In message http://www.isc.org/ml-archives/dhcp-client/2000/10/msg00001.html author Ted Lemon stated "This will not be fixed in any 2.0 release - 2.0 is no longer being maintained." to a reported problem about an interoperability problem against Microsoft servers. FreeBSD went with the ISC client vs. the WIDE client because others convinced me it was better supported. Sigh. I wonder if version 3 will get the same treatment after its release... Since FreeBSD generally uses only released contrib products and the ISC version 3 offering is still in beta, our backs are up against the wall. The common/options.c rev 1.65 work around for erroneous Microsoft DHCP servers has been back ported to the version 2.0pl5 client. Since this comes from a change in the vendor's own code (and would no doubt also be committed to the version 2 client if the author were still supporting it), we will consider this a vendor release and import this as such. PR: 21658 Submitted by: Motomichi Matsuzaki --- contrib/isc-dhcp/common/options.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'contrib/isc-dhcp/common') 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 == '$' || -- cgit v1.2.3