commit d0321f0: [Minor] Off by one
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Feb 8 09:07:04 UTC 2022
Author: Vsevolod Stakhov
Date: 2022-02-08 09:05:35 +0000
URL: https://github.com/rspamd/rspamd/commit/d0321f0863e8d2d22177df38fea065ecf5dfe02e (HEAD -> master)
[Minor] Off by one
---
src/libutil/upstream.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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 */
More information about the Commits
mailing list