summaryrefslogtreecommitdiff
path: root/usr.sbin/dhcp/dhclient/clparse.c
diff options
context:
space:
mode:
authorEric Jackson <ericj@cvs.openbsd.org>2001-01-03 16:04:41 +0000
committerEric Jackson <ericj@cvs.openbsd.org>2001-01-03 16:04:41 +0000
commit994cdb8d3b777662b6dba5a039c1d9a19e82a1cb (patch)
treec62445a704a87c84eeb6224e13a2089a0cfcc923 /usr.sbin/dhcp/dhclient/clparse.c
parent1fc55dfbde4a8de5d2139db13d4cef0f0689c4d3 (diff)
-Wall cleanup.
roll a function for writing out pidfile's instead of rolling it for each program. be careful with a few more buffers
Diffstat (limited to 'usr.sbin/dhcp/dhclient/clparse.c')
-rw-r--r--usr.sbin/dhcp/dhclient/clparse.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/dhcp/dhclient/clparse.c b/usr.sbin/dhcp/dhclient/clparse.c
index b3406ae01cf..9f89be5f199 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.5 1999/12/04 00:15:08 angelos Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.\n";
+"$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";
#endif /* not lint */
#include "dhcpd.h"
@@ -751,10 +751,9 @@ struct option *parse_option_decl (cfile, options)
skip_to_semi (cfile);
return (struct option *)0;
}
- vendor = malloc (strlen (val) + 1);
- if (!vendor)
+ if ((vendor = (char *)malloc (strlen (val))) == NULL)
error ("no memory for vendor information.");
- strcpy (vendor, val);
+ strlcpy(vendor, val, strlen(vendor));
token = peek_token (&val, cfile);
if (token == DOT) {
/* Go ahead and take the DOT token... */