summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2001-07-03 12:51:40 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2001-07-03 12:51:40 +0000
commit52ead7968d372e1969313447bcd5048104ff6177 (patch)
treedf0d57771160eeceff21498c56bf648f0ef6e917 /sbin
parent1ab0cc22b0bfe34139ba0a7a1f8dca6c47ef692b (diff)
strlcpy->strncpy for now
Diffstat (limited to 'sbin')
-rw-r--r--sbin/isakmpd/exchange.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/isakmpd/exchange.c b/sbin/isakmpd/exchange.c
index b9ec5470f44..81148ed1ed6 100644
--- a/sbin/isakmpd/exchange.c
+++ b/sbin/isakmpd/exchange.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exchange.c,v 1.56 2001/07/01 19:48:43 niklas Exp $ */
+/* $OpenBSD: exchange.c,v 1.57 2001/07/03 12:51:39 markus Exp $ */
/* $EOM: exchange.c,v 1.143 2000/12/04 00:02:25 angelos Exp $ */
/*
@@ -1263,11 +1263,12 @@ exchange_check_old_sa (struct sa *sa, void *v_arg)
return 0;
if (sa->initiator)
- strlcpy (res1, ipsec_decode_ids ("%s %s", sa->id_i, sa->id_i_len, sa->id_r,
+ strncpy (res1, ipsec_decode_ids ("%s %s", sa->id_i, sa->id_i_len, sa->id_r,
sa->id_r_len, 0), sizeof res1);
else
- strlcpy (res1, ipsec_decode_ids ("%s %s", sa->id_r, sa->id_r_len, sa->id_i,
+ strncpy (res1, ipsec_decode_ids ("%s %s", sa->id_r, sa->id_r_len, sa->id_i,
sa->id_i_len, 0), sizeof res1);
+ res1[sizeof res1 - 1] = '\0';
LOG_DBG ((LOG_EXCHANGE, 30,
"checking whether new SA replaces existing SA with IDs %s", res1));