diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | pcre_jit_compile.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -21,6 +21,11 @@ was the possibility of a false positive match when caselessly matching a "not this character" item such as [^\x{1234}] (with a code point greater than 127) because the "other case" variable was not being initialized. +5. Although pcre_jit_exec checks whether the pattern is compiled +in a given mode, it was also expected that at least one mode is available. +This is fixed and pcre_jit_exec returns with PCRE_ERROR_JIT_BADOPTION +when the pattern is not optimized by JIT at all. + Version 8.41 05-July-2017 ------------------------- diff --git a/pcre_jit_compile.c b/pcre_jit_compile.c index 249edbe..6366237 100644 --- a/pcre_jit_compile.c +++ b/pcre_jit_compile.c @@ -11529,7 +11529,7 @@ if ((options & PCRE_PARTIAL_HARD) != 0) else if ((options & PCRE_PARTIAL_SOFT) != 0) mode = JIT_PARTIAL_SOFT_COMPILE; -if (functions->executable_funcs[mode] == NULL) +if (functions->executable_funcs == NULL || functions->executable_funcs[mode] == NULL) return PCRE_ERROR_JIT_BADOPTION; /* Sanity checks should be handled by pcre_exec. */ |