]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Apply a signed vs. unsigned fix suggested by Onno Van Der Linden.
authorTed Lemon <source@isc.org>
Thu, 1 Mar 2001 21:44:31 +0000 (21:44 +0000)
committerTed Lemon <source@isc.org>
Thu, 1 Mar 2001 21:44:31 +0000 (21:44 +0000)
common/options.c

index d982fe28d69972433bc58d9a69b12b7fe27558f8..56f3674b7b4b9d0d3ff6164ff25e0247f78018d0 100644 (file)
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: options.c,v 1.84 2001/02/12 19:43:32 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: options.c,v 1.85 2001/03/01 21:44:31 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #define DHCP_OPTION_DATA
@@ -332,7 +332,7 @@ int fqdn_universe_decode (struct option_state *options,
                        goto bad;
                /* Note: If the client sends a single label, the
                   FQDN_DOMAINNAME option won't be set. */
-               if (length - 4 - i > 0 &&
+               if (length > 4 + i &&
                    !save_option_buffer (&fqdn_universe, options, bp,
                                         &bp -> data[6 + i], length - 4 - i,
                                         &fqdn_options [FQDN_DOMAINNAME], 1))