]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Disable warning if cannot normalize in-place
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 5 May 2018 13:21:23 +0000 (14:21 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 5 May 2018 13:21:23 +0000 (14:21 +0100)
src/libutil/str_util.c

index 6f241b88cff50464fcfd7d71909ffe67f1e4c44a..fc8d6637ba6301154ed776bc9b64391a9838be20 100644 (file)
@@ -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);