Module Name: src
Committed By: snj
Date: Tue Jul 14 19:50:21 UTC 2009
Modified Files:
src/dist/dhcp/client [netbsd-5]: dhclient.c
Log Message:
Pull up following revision(s) (requested by tonnerre in ticket #856):
dist/dhcp/client/dhclient.c: revision 1.20
Limit the length of the address mask before we copy it.
To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.19.8.1 src/dist/dhcp/client/dhclient.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/dist/dhcp/client/dhclient.c
diff -u src/dist/dhcp/client/dhclient.c:1.19 src/dist/dhcp/client/dhclient.c:1.19.8.1
--- src/dist/dhcp/client/dhclient.c:1.19 Tue Feb 26 05:03:29 2008
+++ src/dist/dhcp/client/dhclient.c Tue Jul 14 19:50:21 2009
@@ -32,7 +32,7 @@
#ifndef lint
static char ocopyright[] =
-"$Id: dhclient.c,v 1.19 2008/02/26 05:03:29 mellon Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
+"$Id: dhclient.c,v 1.19.8.1 2009/07/14 19:50:21 snj Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -2520,6 +2520,8 @@
if (data.len > 3) {
struct iaddr netmask, subnet, broadcast;
+ if (data.len > sizeof netmask.iabuf)
+ data.len = sizeof netmask.iabuf;
memcpy (netmask.iabuf, data.data, data.len);
netmask.len = data.len;
data_string_forget (&data, MDL);