summaryrefslogtreecommitdiff
path: root/sbin/isakmpd/key.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/isakmpd/key.c')
-rw-r--r--sbin/isakmpd/key.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/isakmpd/key.c b/sbin/isakmpd/key.c
index 2d08ecc4c43..24a916ae57d 100644
--- a/sbin/isakmpd/key.c
+++ b/sbin/isakmpd/key.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: key.c,v 1.5 2001/10/26 16:02:20 ho Exp $ */
+/* $OpenBSD: key.c,v 1.6 2002/01/23 18:44:47 ho Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
*
@@ -113,7 +113,7 @@ key_printable (int type, int private, u_int8_t *data, int datalen)
return 0;
}
for (i = 0; i < datalen; i++)
- sprintf (s + (2 * i), "%02x", data[i]);
+ snprintf (s + (2 * i), 2 * (datalen - i), "%02x", data[i]);
return s;
default: