Upstream patch for rspamd segfault (Closes: #946221)
authorMatthew Vernon <matthew@debian.org>
Sat, 7 Dec 2019 17:05:51 +0000 (17:05 +0000)
committerMatthew Vernon <matthew@debian.org>
Sat, 7 Dec 2019 17:05:51 +0000 (17:05 +0000)
src/pcre2_jit_compile.c

index f564127c2ae2407cfcd0bb2f083992ed3de53a84..304c47afbadc06bf80c7e0cc71d2c5f0627ff415 100644 (file)
@@ -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)