[Pcre-svn] [827] code/trunk/src/pcre2_jit_compile.c: Fix a m…

Top Page
Delete this message
Author: Subversion repository
Date:  
To: pcre-svn
Subject: [Pcre-svn] [827] code/trunk/src/pcre2_jit_compile.c: Fix a match offset check in JIT.
Revision: 827
          http://www.exim.org/viewvc/pcre2?view=rev&revision=827
Author:   zherczeg
Date:     2017-06-16 11:27:02 +0100 (Fri, 16 Jun 2017)
Log Message:
-----------
Fix a match offset check in JIT.


Modified Paths:
--------------
    code/trunk/src/pcre2_jit_compile.c


Modified: code/trunk/src/pcre2_jit_compile.c
===================================================================
--- code/trunk/src/pcre2_jit_compile.c    2017-06-15 16:41:44 UTC (rev 826)
+++ code/trunk/src/pcre2_jit_compile.c    2017-06-16 10:27:02 UTC (rev 827)
@@ -5130,8 +5130,6 @@


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 @@
#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));