Fix pcre2_jit_match early check.
This commit is contained in:
parent
2881730084
commit
f93d278054
|
@ -55,6 +55,11 @@ All these issues should now be fixed.
|
||||||
compressed file (.gz or .bz2) a segfault occurred. (Line buffering should be
|
compressed file (.gz or .bz2) a segfault occurred. (Line buffering should be
|
||||||
ignored for compressed files.)
|
ignored for compressed files.)
|
||||||
|
|
||||||
|
15. Although pcre2_jit_match 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 pcre2_jit_match returns with PCRE2_ERROR_JIT_BADOPTION
|
||||||
|
when the pattern is not optimized by JIT at all.
|
||||||
|
|
||||||
|
|
||||||
Version 10.30 14-August-2017
|
Version 10.30 14-August-2017
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
|
@ -118,7 +118,7 @@ if ((options & PCRE2_PARTIAL_HARD) != 0)
|
||||||
else if ((options & PCRE2_PARTIAL_SOFT) != 0)
|
else if ((options & PCRE2_PARTIAL_SOFT) != 0)
|
||||||
index = 1;
|
index = 1;
|
||||||
|
|
||||||
if (functions->executable_funcs[index] == NULL)
|
if (functions->executable_funcs == NULL || functions->executable_funcs[index] == NULL)
|
||||||
return PCRE2_ERROR_JIT_BADOPTION;
|
return PCRE2_ERROR_JIT_BADOPTION;
|
||||||
|
|
||||||
/* Sanity checks should be handled by pcre_exec. */
|
/* Sanity checks should be handled by pcre_exec. */
|
||||||
|
|
Loading…
Reference in New Issue