summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorHakan Olsson <ho@cvs.openbsd.org>2002-05-23 13:58:58 +0000
committerHakan Olsson <ho@cvs.openbsd.org>2002-05-23 13:58:58 +0000
commita565e0dddb390d87675bb7350fe73d3ec63a8407 (patch)
treec4592f87132ae581e9e00a66f867b4e7f61cfec6 /sbin
parentb678ce97b49a90c1fafb3502ec0418694de68793 (diff)
One last sprintf -> snprintf, requested by deraadt.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/isakmpd/sa.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/isakmpd/sa.c b/sbin/isakmpd/sa.c
index 294d10bc634..2fe1a5a5359 100644
--- a/sbin/isakmpd/sa.c
+++ b/sbin/isakmpd/sa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sa.c,v 1.54 2002/03/17 21:50:59 angelos Exp $ */
+/* $OpenBSD: sa.c,v 1.55 2002/05/23 13:58:57 ho Exp $ */
/* $EOM: sa.c,v 1.112 2000/12/12 00:22:52 niklas Exp $ */
/*
@@ -457,13 +457,14 @@ sa_dump (int cls, int level, char *header, struct sa *sa)
static void
report_spi (FILE *fd, const u_int8_t *buf, size_t sz, int index)
{
- char s[73];
+#define SBUFSZ (2 * 32 + 9)
+ char s[SBUFSZ];
int i, j;
{
for (i = j = 0; i < sz;)
{
- sprintf (s + j, "%02x", buf[i++]);
+ snprintf (s + j, SBUFSZ - j, "%02x", buf[i++]);
j += 2;
if (i % 4 == 0)
{