diff options
author | Kjell Wooding <kjell@cvs.openbsd.org> | 2003-05-14 23:44:49 +0000 |
---|---|---|
committer | Kjell Wooding <kjell@cvs.openbsd.org> | 2003-05-14 23:44:49 +0000 |
commit | 1e5afed5e193388914826cd4c6af8560153e5355 (patch) | |
tree | 62a07e521187a33d4283ca3bdcb54e0ad73be73f /sbin/isakmpd | |
parent | 8cd7d3cb231bdc064427e002c329ef68fe61f5a5 (diff) |
properly terminate debug string (levels >=40)
Use "%.*s" as suggested by Niklas.
ok ho@. Lost by kjell. oked ho@. lost by kjell again. oked ho@
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r-- | sbin/isakmpd/pf_key_v2.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/isakmpd/pf_key_v2.c b/sbin/isakmpd/pf_key_v2.c index 406d87c999b..99fa0b45325 100644 --- a/sbin/isakmpd/pf_key_v2.c +++ b/sbin/isakmpd/pf_key_v2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_key_v2.c,v 1.127 2003/05/14 17:37:22 ho Exp $ */ +/* $OpenBSD: pf_key_v2.c,v 1.128 2003/05/14 23:44:48 kjell Exp $ */ /* $EOM: pf_key_v2.c,v 1.79 2000/12/12 00:33:19 niklas Exp $ */ /* @@ -2174,7 +2174,8 @@ pf_key_v2_convert_id (u_int8_t *id, int idlen, size_t *reslen, int *idtype) *reslen = idlen - ISAKMP_ID_DATA_OFF + ISAKMP_GEN_SZ; memcpy (res, id + ISAKMP_ID_DATA_OFF - ISAKMP_GEN_SZ, *reslen); *idtype = SADB_IDENTTYPE_FQDN; - LOG_DBG ((LOG_SYSDEP, 40, "pf_key_v2_convert_id: FQDN %s", res)); + LOG_DBG ((LOG_SYSDEP, 40, "pf_key_v2_convert_id: FQDN %.*s", + (int)*reslen, res)); return res; case IPSEC_ID_USER_FQDN: @@ -2186,7 +2187,8 @@ pf_key_v2_convert_id (u_int8_t *id, int idlen, size_t *reslen, int *idtype) *reslen = idlen - ISAKMP_ID_DATA_OFF + ISAKMP_GEN_SZ; memcpy (res, id + ISAKMP_ID_DATA_OFF - ISAKMP_GEN_SZ, *reslen); *idtype = SADB_IDENTTYPE_USERFQDN; - LOG_DBG ((LOG_SYSDEP, 40, "pf_key_v2_convert_id: UFQDN %s", res)); + LOG_DBG ((LOG_SYSDEP, 40, "pf_key_v2_convert_id: UFQDN %.*s", + (int)*reslen, res)); return res; case IPSEC_ID_IPV4_ADDR: /* XXX CONNECTION ? */ |