From e498305676c6975a12afdb4216697248f5eb3456 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 21 Jun 2021 13:39:26 +0100 Subject: [PATCH] [Minor] Fix for old libicu --- src/libserver/html/html_url.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libserver/html/html_url.cxx b/src/libserver/html/html_url.cxx index a95daccf6..f1a0538be 100644 --- a/src/libserver/html/html_url.cxx +++ b/src/libserver/html/html_url.cxx @@ -99,7 +99,8 @@ convert_idna_hostname_maybe(rspamd_mempool_t *pool, struct rspamd_url *url, bool icu::IDNAInfo info; auto uc_err = U_ZERO_ERROR; auto *udn = get_icu_idna_instance(); - udn->nameToASCII_UTF8(ret,byte_sink, info, uc_err); + udn->nameToASCII_UTF8(icu::StringPiece(ret.data(), ret.size()), + byte_sink, info, uc_err); if (uc_err == U_ZERO_ERROR && !info.hasErrors()) { ret = std::string_view{idn_hbuf, (std::size_t)byte_sink.NumberOfBytesWritten()}; -- 2.39.5