]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix for old libicu
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 21 Jun 2021 12:39:26 +0000 (13:39 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 21 Jun 2021 12:39:26 +0000 (13:39 +0100)
src/libserver/html/html_url.cxx

index a95daccf64133ec3cd6ed0ef51607770db7a2e96..f1a0538be01af6fbb57622292b7a456f0d85fc7d 100644 (file)
@@ -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()};