summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Vernon <matthew@debian.org>2019-12-07 17:05:51 +0000
committerMatthew Vernon <matthew@debian.org>2019-12-07 17:05:51 +0000
commitb81f2a214a4100546cf6215ea3c32d2368fd4ad6 (patch)
tree9c23b54021d047674f00387b75195c30baf2e3eb
parent76e8277010c395db1ccc724bf83a8a28a379297f (diff)
Upstream patch for rspamd segfault (Closes: #946221)
-rw-r--r--src/pcre2_jit_compile.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c
index f564127..304c47a 100644
--- a/src/pcre2_jit_compile.c
+++ b/src/pcre2_jit_compile.c
@@ -13742,11 +13742,6 @@ pcre2_jit_compile(pcre2_code *code, uint32_t options)
{
pcre2_real_code *re = (pcre2_real_code *)code;
-#ifdef SUPPORT_JIT
-executable_functions *functions = (executable_functions *)re->executable_jit;
-static int executable_allocator_is_working = 0;
-#endif
-
if (code == NULL)
return PCRE2_ERROR_NULL;
@@ -13779,6 +13774,11 @@ actions are needed:
avoid compiler warnings.
*/
+#ifdef SUPPORT_JIT
+executable_functions *functions = (executable_functions *)re->executable_jit;
+static int executable_allocator_is_working = 0;
+#endif
+
if ((options & PCRE2_JIT_INVALID_UTF) != 0)
{
if ((re->overall_options & PCRE2_MATCH_INVALID_UTF) == 0)