summaryrefslogtreecommitdiff
path: root/usr.sbin/dhcp
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>1999-12-04 00:15:10 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>1999-12-04 00:15:10 +0000
commitba8d8838d0b309bbe0deb35d65ad6d3218e3e395 (patch)
treeed4548ca00803395e85c4467eaff7152cf2f203a /usr.sbin/dhcp
parent86aaf0741e273e904c0dbf088f076c35551f23f4 (diff)
Careful with long, command-line provided interface names.
Diffstat (limited to 'usr.sbin/dhcp')
-rw-r--r--usr.sbin/dhcp/dhclient/clparse.c4
-rw-r--r--usr.sbin/dhcp/dhclient/dhclient.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/dhcp/dhclient/clparse.c b/usr.sbin/dhcp/dhclient/clparse.c
index c284da920e0..b3406ae01cf 100644
--- a/usr.sbin/dhcp/dhclient/clparse.c
+++ b/usr.sbin/dhcp/dhclient/clparse.c
@@ -42,7 +42,7 @@
#ifndef lint
static char copyright[] =
-"$Id: clparse.c,v 1.4 1999/02/11 22:49:59 deraadt Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.\n";
+"$Id: clparse.c,v 1.5 1999/12/04 00:15:08 angelos Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -494,7 +494,7 @@ struct interface_info *interface_or_dummy (name)
error ("Insufficient memory to record interface %s",
name);
memset (ip, 0, sizeof *ip);
- strcpy (ip -> name, name);
+ strlcpy (ip -> name, name, IFNAMSIZ);
ip -> next = dummy_interfaces;
dummy_interfaces = ip;
}
diff --git a/usr.sbin/dhcp/dhclient/dhclient.c b/usr.sbin/dhcp/dhclient/dhclient.c
index db036807591..ab4c9ccfe21 100644
--- a/usr.sbin/dhcp/dhclient/dhclient.c
+++ b/usr.sbin/dhcp/dhclient/dhclient.c
@@ -56,7 +56,7 @@
#ifndef lint
static char copyright[] =
-"$Id: dhclient.c,v 1.6 1999/11/30 21:45:10 angelos Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dhclient.c,v 1.7 1999/12/04 00:15:09 angelos Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -138,7 +138,7 @@ int main (argc, argv, envp)
error ("Insufficient memory to %s %s",
"record interface", argv [i]);
memset (tmp, 0, sizeof *tmp);
- strcpy (tmp -> name, argv [i]);
+ strlcpy (tmp -> name, argv [i], IFNAMSIZ);
tmp -> next = interfaces;
tmp -> flags = INTERFACE_REQUESTED;
interfaces_requested = 1;