aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libutil/upstream.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libutil/upstream.c b/src/libutil/upstream.c
index d22e71354..447df7c57 100644
--- a/src/libutil/upstream.c
+++ b/src/libutil/upstream.c
@@ -666,7 +666,8 @@ rspamd_upstream_resolve_addrs (const struct upstream_list *ls,
if (semicolon_pos != NULL && semicolon_pos > upstream->name) {
if (sizeof (dns_name) > semicolon_pos - upstream->name) {
- rspamd_strlcpy(dns_name, upstream->name, semicolon_pos - upstream->name);
+ rspamd_strlcpy(dns_name, upstream->name,
+ semicolon_pos - upstream->name + 1);
}
else {
/* XXX: truncated */