aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/upstream.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2022-02-08 09:05:35 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2022-02-08 09:05:35 +0000
commitd0321f0863e8d2d22177df38fea065ecf5dfe02e (patch)
treef291403a157275130d9ed1169c3782d28e1c3ec3 /src/libutil/upstream.c
parent7bf24f093da9151b8b8887fd40b64a51d1116437 (diff)
downloadrspamd-d0321f0863e8d2d22177df38fea065ecf5dfe02e.tar.gz
rspamd-d0321f0863e8d2d22177df38fea065ecf5dfe02e.zip
[Minor] Off by one
Diffstat (limited to 'src/libutil/upstream.c')
-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 */