Module Name: src
Committed By: snj
Date: Tue Jul 14 19:57:00 UTC 2009
Modified Files:
src/dist/dhcp/client [netbsd-4-0]: dhclient.c
Log Message:
Pull up following revision(s) (requested by tonnerre in ticket #1336):
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.18 -r1.18.12.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.18 src/dist/dhcp/client/dhclient.c:1.18.12.1
--- src/dist/dhcp/client/dhclient.c:1.18 Sat Oct 7 14:14:06 2006
+++ src/dist/dhcp/client/dhclient.c Tue Jul 14 19:57:00 2009
@@ -32,7 +32,7 @@
#ifndef lint
static char ocopyright[] =
-"$Id: dhclient.c,v 1.18 2006/10/07 14:14:06 tron Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
+"$Id: dhclient.c,v 1.18.12.1 2009/07/14 19:57:00 snj Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -2521,6 +2521,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);