From: Ted Lemon Date: Thu, 1 Mar 2001 21:44:31 +0000 (+0000) Subject: Apply a signed vs. unsigned fix suggested by Onno Van Der Linden. X-Git-Tag: V3-BETA-2-PATCH-19~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=530de8b20c5e29e6ce2fac235928b2b3d64d51fa;p=thirdparty%2Fdhcp.git Apply a signed vs. unsigned fix suggested by Onno Van Der Linden. --- diff --git a/common/options.c b/common/options.c index d982fe28d..56f3674b7 100644 --- a/common/options.c +++ b/common/options.c @@ -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))