summaryrefslogtreecommitdiff
path: root/usr.sbin/dhcp/dhclient
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-01-06 22:02:24 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-01-06 22:02:24 +0000
commitf6e6e8a8bb4cb31c495fcac41bd35c70381605a6 (patch)
tree6bcc4713a7546dcfd069b6f179b005a471354a7a /usr.sbin/dhcp/dhclient
parent08630c92a1cb8c9c2f7d1669fcbeeaeb287aee06 (diff)
Commit 1.6 was just plain wrong on two counts; as a result, it caused
dhclient to complain about options.
Diffstat (limited to 'usr.sbin/dhcp/dhclient')
-rw-r--r--usr.sbin/dhcp/dhclient/clparse.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/dhcp/dhclient/clparse.c b/usr.sbin/dhcp/dhclient/clparse.c
index 9f89be5f199..8bf65d1dd0f 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.6 2001/01/03 16:04:39 ericj Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.\n";
+"$Id: clparse.c,v 1.7 2001/01/06 22:02:23 angelos Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -751,9 +751,8 @@ struct option *parse_option_decl (cfile, options)
skip_to_semi (cfile);
return (struct option *)0;
}
- if ((vendor = (char *)malloc (strlen (val))) == NULL)
+ if ((vendor = (char *)strdup (val)) == NULL)
error ("no memory for vendor information.");
- strlcpy(vendor, val, strlen(vendor));
token = peek_token (&val, cfile);
if (token == DOT) {
/* Go ahead and take the DOT token... */