Module Name: src Committed By: christos Date: Tue Jun 23 19:50:50 UTC 2009
Modified Files: src/dist/dhcp/client: dhclient.c Log Message: Limit the length of the address mask before we copy it. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 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.20 --- src/dist/dhcp/client/dhclient.c:1.19 Tue Feb 26 00:03:29 2008 +++ src/dist/dhcp/client/dhclient.c Tue Jun 23 15:50:50 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.20 2009/06/23 19:50:50 christos 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);