]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Off by one
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 8 Feb 2022 09:05:35 +0000 (09:05 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 8 Feb 2022 09:05:35 +0000 (09:05 +0000)
src/libutil/upstream.c

index d22e71354aa7f1e1a1078c086ae0c2202bffe786..447df7c574314fab4cf240cb837e5f3634b3f754 100644 (file)
@@ -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 */