diff options
author | 2003-05-14 23:44:48 +0000 | |
---|---|---|
committer | 2003-05-14 23:44:48 +0000 | |
commit | d05d5d6a1754fa89f0f406a501449fb8204aded8 (patch) | |
tree | 9d1dc6c7633f85b2b5844dd148968037e1841d01 | |
parent | use __KAME__ to determine kame-based kernel. (diff) | |
download | wireguard-openbsd-d05d5d6a1754fa89f0f406a501449fb8204aded8.tar.xz wireguard-openbsd-d05d5d6a1754fa89f0f406a501449fb8204aded8.zip |
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@
-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 ? */ |