From bb3b7927f36a6bc5fa1f8f8b351af88af7b7b7c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Herczeg?= Date: Sun, 30 Nov 2014 10:05:41 +0000 Subject: [PATCH] Next attempt to fix the previous bug. --- src/pcre2_jit_match.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pcre2_jit_match.c b/src/pcre2_jit_match.c index 071b92b..89c06af 100644 --- a/src/pcre2_jit_match.c +++ b/src/pcre2_jit_match.c @@ -139,6 +139,10 @@ if (mcontext != NULL) arguments.callout_data = mcontext->callout_data; arguments.limit_match = (mcontext->match_limit < re->limit_match)? mcontext->match_limit : re->limit_match; + if (mcontext->jit_callback != NULL) + jit_stack = mcontext->jit_callback(mcontext->jit_callback_data); + else + jit_stack = (pcre2_jit_stack *)mcontext->jit_callback_data; } else { @@ -146,6 +150,7 @@ else arguments.callout_data = NULL; arguments.limit_match = (MATCH_LIMIT < re->limit_match)? MATCH_LIMIT : re->limit_match; + jit_stack = NULL; } /* JIT only need two offsets for each ovector entry. Hence @@ -156,10 +161,6 @@ if (oveccount > max_oveccount) oveccount = max_oveccount; arguments.oveccount = oveccount << 1; -if (mcontext && mcontext->jit_callback != NULL) - jit_stack = mcontext->jit_callback(mcontext->jit_callback_data); -else - jit_stack = (pcre2_jit_stack *)mcontext->jit_callback_data; convert_executable_func.executable_func = functions->executable_funcs[index]; if (jit_stack != NULL)