summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzherczeg <zherczeg@6239d852-aaf2-0410-a92c-79f79f948069>2017-06-16 10:27:02 +0000
committerzherczeg <zherczeg@6239d852-aaf2-0410-a92c-79f79f948069>2017-06-16 10:27:02 +0000
commit8e0dcc6cd77c605ee3a9e13704508a3e62ef3289 (patch)
treeabb111cd2e4bfdc312cf70790096e9635ca6d6bd
parenta406c9168842912f94d269f991b92735a235e62a (diff)
downloadpcre2-8e0dcc6cd77c605ee3a9e13704508a3e62ef3289.tar.gz
Fix a match offset check in JIT.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@827 6239d852-aaf2-0410-a92c-79f79f948069
-rw-r--r--src/pcre2_jit_compile.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c
index 71bdb5e..31817ae 100644
--- a/src/pcre2_jit_compile.c
+++ b/src/pcre2_jit_compile.c
@@ -5130,8 +5130,6 @@ if (range_right < 0)
SLJIT_ASSERT(range_right != offset);
-max -= 1;
-SLJIT_ASSERT(max > 0);
if (common->match_end_ptr != 0)
{
OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr);
@@ -5150,7 +5148,7 @@ OP1(SLJIT_MOV, RETURN_ADDR, 0, SLJIT_IMM, (sljit_sw)update_table);
#endif
start = LABEL();
-add_jump(compiler, &common->failed_match, CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0));
+add_jump(compiler, &common->failed_match, CMP(SLJIT_GREATER, STR_PTR, 0, STR_END, 0));
#if PCRE2_CODE_UNIT_WIDTH == 8 || (defined SLJIT_LITTLE_ENDIAN && SLJIT_LITTLE_ENDIAN)
OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(range_right));