diff options
-rw-r--r-- | lib/libipsec/ipsec_dump_policy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libipsec/ipsec_dump_policy.c b/lib/libipsec/ipsec_dump_policy.c index 638d788..5ddad43 100644 --- a/lib/libipsec/ipsec_dump_policy.c +++ b/lib/libipsec/ipsec_dump_policy.c @@ -162,7 +162,8 @@ ipsec_dump_policy(policy, delimiter) return NULL; } buf = newbuf; - snprintf(buf, buflen, "%s%s%s", buf, delimiter, isrbuf); + snprintf(buf + strlen(buf), buflen - strlen(buf), + "%s%s", delimiter, isrbuf); off += xisr->sadb_x_ipsecrequest_len; } |