From 91154ccc0114f1dca3b803a9c9bcfd065297c329 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 5 May 2018 14:21:23 +0100 Subject: [PATCH] [Minor] Disable warning if cannot normalize in-place --- src/libutil/str_util.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/libutil/str_util.c b/src/libutil/str_util.c index 6f241b88c..fc8d6637b 100644 --- a/src/libutil/str_util.c +++ b/src/libutil/str_util.c @@ -2062,8 +2062,11 @@ rspamd_normalise_unicode_inplace (rspamd_mempool_t *pool, gchar *start, src + end, nsym - end, &uc_err); if (!U_SUCCESS (uc_err)) { - msg_warn_pool_check ("cannot normalise URL: %s", - u_errorName (uc_err)); + if (uc_err != U_BUFFER_OVERFLOW_ERROR) { + msg_warn_pool_check ("cannot normalise URL: %s", + u_errorName (uc_err)); + } + goto out; } @@ -2077,7 +2080,8 @@ rspamd_normalise_unicode_inplace (rspamd_mempool_t *pool, gchar *start, } *len = nsym; - out: + +out: if (src) { g_free (src); -- 2.39.5