diff --git a/ChangeLog b/ChangeLog index 739e9ba..80d2ec5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,9 @@ Version 10.35 2. Fix ARMv5 JIT improper handling of labels right after a constant pool. +3. A JIT bug is fixed which allowed to read the fields of the compiled +pattern before its existence is checked. + Version 10.34 21-November-2019 ------------------------------ diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c index 1d64536..303c68f 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)