summaryrefslogtreecommitdiff
path: root/usr.sbin/dhcp
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2001-08-28 18:44:10 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2001-08-28 18:44:10 +0000
commitef81a4a022c0f61e03fbaaa0df46040ce03782da (patch)
treecf115a46300938e9a39237908b7e8c05a773ec2a /usr.sbin/dhcp
parente5185470176f4030880f802181f16c85b9aace8c (diff)
fix a segfault occuring in dhclient when the server specifies his name.
ok beck@
Diffstat (limited to 'usr.sbin/dhcp')
-rw-r--r--usr.sbin/dhcp/dhclient/dhclient.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/dhcp/dhclient/dhclient.c b/usr.sbin/dhcp/dhclient/dhclient.c
index 50fdb0ba47d..fa5525ca2ad 100644
--- a/usr.sbin/dhcp/dhclient/dhclient.c
+++ b/usr.sbin/dhcp/dhclient/dhclient.c
@@ -943,8 +943,8 @@ struct client_lease *packet_to_lease (packet)
free_client_lease (lease);
return (struct client_lease *)0;
}
- memcpy(lease->filename, packet->raw->sname, DHCP_SNAME_LEN);
- lease->filename[DHCP_SNAME_LEN]='\0';
+ memcpy(lease->server_name, packet->raw->sname, DHCP_SNAME_LEN);
+ lease->server_name[DHCP_SNAME_LEN]='\0';
if (! res_hnok (lease->server_name) ) {
warn ("Bogus server name %s", lease->server_name );
free_client_lease (lease);