summaryrefslogtreecommitdiff
path: root/src/pcre2_jit_compile.c
diff options
context:
space:
mode:
authorzherczeg <zherczeg@6239d852-aaf2-0410-a92c-79f79f948069>2020-02-20 07:42:47 +0000
committerzherczeg <zherczeg@6239d852-aaf2-0410-a92c-79f79f948069>2020-02-20 07:42:47 +0000
commit5446ab8fa22b7e685c01cbfc5a673d2c7f994c93 (patch)
tree245298be73b89868d23ce7d7324d1406af99af6f /src/pcre2_jit_compile.c
parentf22e85edd01a9d72d69a3c3cf075d6b7b89213c2 (diff)
downloadpcre2-5446ab8fa22b7e685c01cbfc5a673d2c7f994c93.tar.gz
Fix a crash which occurs when the character type of an invalid UTF character is decoded in JIT.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1221 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'src/pcre2_jit_compile.c')
-rw-r--r--src/pcre2_jit_compile.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c
index 10665a8..ef29a76 100644
--- a/src/pcre2_jit_compile.c
+++ b/src/pcre2_jit_compile.c
@@ -7224,7 +7224,13 @@ cc = ccbegin;
if ((cc[-1] & XCL_NOT) != 0)
read_char(common, min, max, backtracks, READ_CHAR_UPDATE_STR_PTR);
else
+ {
+#ifdef SUPPORT_UNICODE
+ read_char(common, min, max, (needstype || needsscript) ? backtracks : NULL, 0);
+#else /* !SUPPORT_UNICODE */
read_char(common, min, max, NULL, 0);
+#endif /* SUPPORT_UNICODE */
+ }
if ((cc[-1] & XCL_HASPROP) == 0)
{