diff options
author | Hakan Olsson <ho@cvs.openbsd.org> | 2001-07-03 08:07:23 +0000 |
---|---|---|
committer | Hakan Olsson <ho@cvs.openbsd.org> | 2001-07-03 08:07:23 +0000 |
commit | b163e4452c394ca4647feacb3ab9fd72ed1e05b0 (patch) | |
tree | 233c08f71fa544977b0aef7285bb208ab0e83503 /sbin/isakmpd | |
parent | f08b38c8c5a2048d2580d01b793fe39a8d5910c2 (diff) |
use strlcpy instead of memcpy to copy strings
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r-- | sbin/isakmpd/policy.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/isakmpd/policy.c b/sbin/isakmpd/policy.c index 91480f191c5..f2a6b5c1455 100644 --- a/sbin/isakmpd/policy.c +++ b/sbin/isakmpd/policy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: policy.c,v 1.37 2001/07/01 19:48:44 niklas Exp $ */ +/* $OpenBSD: policy.c,v 1.38 2001/07/03 08:07:22 ho Exp $ */ /* $EOM: policy.c,v 1.49 2000/10/24 13:33:39 niklas Exp $ */ /* @@ -651,7 +651,7 @@ policy_callback (char *name) log_error ("policy_callback: sockaddr2text failed"); goto bad; } - memcpy (local_ike_address, addr, sizeof local_ike_address); + strlcpy (local_ike_address, addr, sizeof local_ike_address); free (addr); policy_sa->transport->vtbl->get_dst (policy_sa->transport, &sin); @@ -660,7 +660,7 @@ policy_callback (char *name) log_error ("policy_callback: sockaddr2text failed"); goto bad; } - memcpy (remote_ike_address, addr, sizeof remote_ike_address); + strlcpy (remote_ike_address, addr, sizeof remote_ike_address); free (addr); switch (policy_isakmp_sa->exch_type) |