From: Vsevolod Stakhov Date: Mon, 21 Jun 2021 12:39:26 +0000 (+0100) Subject: [Minor] Fix for old libicu X-Git-Tag: 3.0~268 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e498305676c6975a12afdb4216697248f5eb3456;p=rspamd.git [Minor] Fix for old libicu --- 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()};