]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Detect double-null-terminated hostname - a bug in some Lexmark printers.
authorTed Lemon <source@isc.org>
Thu, 17 Jan 2002 17:01:46 +0000 (17:01 +0000)
committerTed Lemon <source@isc.org>
Thu, 17 Jan 2002 17:01:46 +0000 (17:01 +0000)
server/dhcp.c

index 9a3f0baf00a3e40e6f8ee5582e3a1a2df4520788..281f215c92c8ebec5b77e15a2828af91a45218e4 100644 (file)
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: dhcp.c,v 1.195 2001/08/10 10:50:45 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: dhcp.c,v 1.196 2002/01/17 17:01:46 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -206,8 +206,8 @@ void dhcp (packet)
        if ((oc = lookup_option (&dhcp_universe, packet -> options,
                                 DHO_HOST_NAME))) {
                if (!oc -> expression)
-                       if (oc -> data.len &&
-                           oc -> data.data [oc -> data.len - 1] == 0) {
+                       while (oc -> data.len &&
+                              oc -> data.data [oc -> data.len - 1] == 0) {
                                ms_nulltp = 1;
                                oc -> data.len--;
                        }