From 33ddedb6c00ffc122b343cb715f7dff5a5a27556 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 23 Jun 2021 11:09:42 +0100 Subject: [PATCH] [Minor] Fix base tag processing --- src/libserver/html/html.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libserver/html/html.cxx b/src/libserver/html/html.cxx index 683f92006..32862ed20 100644 --- a/src/libserver/html/html.cxx +++ b/src/libserver/html/html.cxx @@ -701,9 +701,9 @@ html_process_url_tag(rspamd_mempool_t *pool, auto *buf = rspamd_mempool_alloc_buffer(pool, len + 1); auto nlen = (std::size_t)rspamd_snprintf(buf, len + 1, "%*s%s%*s", - hc->base_url->urllen, hc->base_url->string, + (int)hc->base_url->urllen, hc->base_url->string, need_slash ? "/" : "", - (gint) orig_len, href_value.size()); + (gint)orig_len, href_value.data()); href_value = {buf, nlen}; } else if (href_value[0] == '/' && href_value[1] != '/') { @@ -713,8 +713,8 @@ html_process_url_tag(rspamd_mempool_t *pool, 3 /* for :// */; auto *buf = rspamd_mempool_alloc_buffer(pool, len + 1); auto nlen = (std::size_t)rspamd_snprintf(buf, len + 1, "%*s://%*s/%*s", - hc->base_url->protocollen, hc->base_url->string, - hc->base_url->hostlen, rspamd_url_host_unsafe (hc->base_url), + (int)hc->base_url->protocollen, hc->base_url->string, + (int)hc->base_url->hostlen, rspamd_url_host_unsafe (hc->base_url), (gint)orig_len, href_value.data()); href_value = {buf, nlen}; } -- 2.39.5