summaryrefslogtreecommitdiffstats
path: root/freebsd/sbin/dhclient/clparse.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-11-06 16:20:21 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-11-11 10:08:08 +0100
commit66659ff1ad6831b0ea7425fa6ecd8a8687523658 (patch)
tree48e22b475fa8854128e0861a33fed6f78c8094b5 /freebsd/sbin/dhclient/clparse.c
parentDefine __GLOBL1() and __GLOBL() (diff)
downloadrtems-libbsd-66659ff1ad6831b0ea7425fa6ecd8a8687523658.tar.bz2
Update to FreeBSD 9.2
Diffstat (limited to 'freebsd/sbin/dhclient/clparse.c')
-rw-r--r--freebsd/sbin/dhclient/clparse.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/freebsd/sbin/dhclient/clparse.c b/freebsd/sbin/dhclient/clparse.c
index 7fb278dd..b52bc473 100644
--- a/freebsd/sbin/dhclient/clparse.c
+++ b/freebsd/sbin/dhclient/clparse.c
@@ -875,6 +875,7 @@ parse_string_list(FILE *cfile, struct string_list **lp, int multiple)
{
int token;
char *val;
+ size_t valsize;
struct string_list *cur, *tmp;
/* Find the last medium in the media list. */
@@ -892,10 +893,11 @@ parse_string_list(FILE *cfile, struct string_list **lp, int multiple)
return;
}
- tmp = new_string_list(strlen(val) + 1);
+ valsize = strlen(val) + 1;
+ tmp = new_string_list(valsize);
if (tmp == NULL)
error("no memory for string list entry.");
- strlcpy(tmp->string, val, strlen(val) + 1);
+ memcpy(tmp->string, val, valsize);
tmp->next = NULL;
/* Store this medium at the end of the media list. */