Blob Blame History Raw
From ad21e1941bfe5d5c8d8474028139343f884bf28c Mon Sep 17 00:00:00 2001
From: zherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>
Date: Tue, 14 Feb 2017 08:48:18 +0000
Subject: [PATCH] Fix a missing else in the JIT compiler reported by
 'idaifish'.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Petr Pisar: Ported to 8.40:

commit 7ddfbe9d0b9f43402f8043e940172a318cc407c6
Author: zherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>
Date:   Tue Feb 14 08:48:18 2017 +0000

    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

Signed-off-by: Petr Písař <ppisar@redhat.com>
---
 pcre_jit_compile.c    | 2 +-
 testdata/testinput12  | 2 ++
 testdata/testoutput12 | 2 ++
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/pcre_jit_compile.c b/pcre_jit_compile.c
index 46ce6c6..a6e2ad5 100644
--- a/pcre_jit_compile.c
+++ b/pcre_jit_compile.c
@@ -8111,7 +8111,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 --/
-- 
2.7.4