summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>2017-02-14 08:48:18 +0000
committerzherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>2017-02-14 08:48:18 +0000
commit7ddfbe9d0b9f43402f8043e940172a318cc407c6 (patch)
treed750fba559f054232b0eaac9427702076a8d4c18
parent8b0fdf16e57ce9a653a0a03c39f6cc061e8122e8 (diff)
downloadpcre-7ddfbe9d0b9f43402f8043e940172a318cc407c6.tar.gz
Fix a missing else in the JIT compiler reported by 'idaifish'.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1680 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--ChangeLog2
-rw-r--r--pcre_jit_compile.c2
-rw-r--r--testdata/testinput122
-rw-r--r--testdata/testoutput122
4 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 373ee84..d813935 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,8 @@ mode with --only-matching matched several lines, it restarted scanning at the
next line instead of moving on to the end of the matched string, which can be
several lines after the start.
+3. Fix a missing else in the JIT compiler reported by 'idaifish'.
+
Version 8.40 11-January-2017
----------------------------
diff --git a/pcre_jit_compile.c b/pcre_jit_compile.c
index c301f05..6ef8e48 100644
--- a/pcre_jit_compile.c
+++ b/pcre_jit_compile.c
@@ -8110,7 +8110,7 @@ if (opcode == OP_COND || opcode == OP_SCOND)
if (*matchingpath == OP_FAIL)
stacksize = 0;
- if (*matchingpath == OP_RREF)
+ else if (*matchingpath == OP_RREF)
{
stacksize = GET2(matchingpath, 1);
if (common->currententry == NULL)
diff --git a/testdata/testinput12 b/testdata/testinput12
index 944be69..89ed456 100644
--- a/testdata/testinput12
+++ b/testdata/testinput12
@@ -104,4 +104,6 @@ and a couple of things that are different with JIT. --/
/(.|.)*?bx/
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabax
+/((?(?!))x)(?'name')(?1)/S++
+
/-- End of testinput12 --/
diff --git a/testdata/testoutput12 b/testdata/testoutput12
index 8791108..7632c4e 100644
--- a/testdata/testoutput12
+++ b/testdata/testoutput12
@@ -201,4 +201,6 @@ No match, mark = m (JIT)
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabax
Error -8 (match limit exceeded)
+/((?(?!))x)(?'name')(?1)/S++
+
/-- End of testinput12 --/