summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorHakan Olsson <ho@cvs.openbsd.org>2001-07-03 11:00:53 +0000
committerHakan Olsson <ho@cvs.openbsd.org>2001-07-03 11:00:53 +0000
commit127d3ffdc68a8bd39cbd357772fdf26fd4907a6e (patch)
tree743ed1b6155e42acb8a535c7c9ba1a8fdd1f5135 /sbin
parentb163e4452c394ca4647feacb3ab9fd72ed1e05b0 (diff)
Wait with strlcpy a while, change to strncpy.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/isakmpd/policy.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/isakmpd/policy.c b/sbin/isakmpd/policy.c
index f2a6b5c1455..d969e8cd24e 100644
--- a/sbin/isakmpd/policy.c
+++ b/sbin/isakmpd/policy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: policy.c,v 1.38 2001/07/03 08:07:22 ho Exp $ */
+/* $OpenBSD: policy.c,v 1.39 2001/07/03 11:00:52 ho Exp $ */
/* $EOM: policy.c,v 1.49 2000/10/24 13:33:39 niklas Exp $ */
/*
@@ -651,7 +651,8 @@ policy_callback (char *name)
log_error ("policy_callback: sockaddr2text failed");
goto bad;
}
- strlcpy (local_ike_address, addr, sizeof local_ike_address);
+ strncpy (local_ike_address, addr, sizeof local_ike_address);
+ local_ike_address[sizeof local_ike_address - 1] = '\0';
free (addr);
policy_sa->transport->vtbl->get_dst (policy_sa->transport, &sin);
@@ -660,7 +661,8 @@ policy_callback (char *name)
log_error ("policy_callback: sockaddr2text failed");
goto bad;
}
- strlcpy (remote_ike_address, addr, sizeof remote_ike_address);
+ strncpy (remote_ike_address, addr, sizeof remote_ike_address);
+ remote_ike_address[sizeof remote_ike_address - 1] = '\0';
free (addr);
switch (policy_isakmp_sa->exch_type)