From: Vsevolod Stakhov Date: Fri, 15 May 2015 15:36:15 +0000 (+0100) Subject: Restore utf8 validation as it causes segfaults sometimes. X-Git-Tag: 0.9.1~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=463aa1e6775557493a827c872296964e89902e0e;p=rspamd.git Restore utf8 validation as it causes segfaults sometimes. --- diff --git a/src/libutil/regexp.c b/src/libutil/regexp.c index 977bb0268..15d83dd44 100644 --- a/src/libutil/regexp.c +++ b/src/libutil/regexp.c @@ -382,11 +382,12 @@ rspamd_regexp_search (rspamd_regexp_t *re, const gchar *text, gsize len, #endif } else { - match_flags |= PCRE_NO_UTF8_CHECK; r = re->re; ext = re->extra; #if defined(HAVE_PCRE_JIT) && defined(HAVE_PCRE_JIT_FAST) - st = re->jstack; + if (g_utf8_validate (mt, remain, NULL)) { + st = re->jstack; + } #endif }