From: Vsevolod Stakhov Date: Wed, 23 Jun 2021 10:09:42 +0000 (+0100) Subject: [Minor] Fix base tag processing X-Git-Tag: 3.0~256 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=33ddedb6c00ffc122b343cb715f7dff5a5a27556;p=rspamd.git [Minor] Fix base tag processing --- 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}; }