|
|
08805a |
From eb1ab619f3f36539e53e6a481a0aa168afa10596 Mon Sep 17 00:00:00 2001
|
|
|
08805a |
From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
|
|
|
08805a |
Date: Tue, 19 May 2015 16:02:06 +0000
|
|
|
08805a |
Subject: [PATCH] Fix buffer overflow for lookbehind within mutually recursive
|
|
|
08805a |
subroutines.
|
|
|
08805a |
MIME-Version: 1.0
|
|
|
08805a |
Content-Type: text/plain; charset=UTF-8
|
|
|
08805a |
Content-Transfer-Encoding: 8bit
|
|
|
08805a |
|
|
|
08805a |
Ported to 8.32:
|
|
|
08805a |
|
|
|
08805a |
commit 9f2cf82ed9380bb4a726250833d6a0d295be8747
|
|
|
08805a |
Author: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
|
|
|
08805a |
Date: Tue May 19 16:02:06 2015 +0000
|
|
|
08805a |
|
|
|
08805a |
Fix buffer overflow for lookbehind within mutually recursive subroutines.
|
|
|
08805a |
|
|
|
08805a |
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1560 2f5784b3-3f2a-0410-8824-cb99058d5e15
|
|
|
08805a |
|
|
|
08805a |
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
08805a |
---
|
|
|
08805a |
pcre_compile.c | 2 +-
|
|
|
08805a |
testdata/testinput2 | 3 +++
|
|
|
08805a |
testdata/testoutput2 | 3 +++
|
|
|
08805a |
3 files changed, 7 insertions(+), 1 deletion(-)
|
|
|
08805a |
|
|
|
08805a |
diff --git a/pcre_compile.c b/pcre_compile.c
|
|
|
08805a |
index 0215861..7d203eb 100644
|
|
|
08805a |
--- a/pcre_compile.c
|
|
|
08805a |
+++ b/pcre_compile.c
|
|
|
08805a |
@@ -1811,7 +1811,7 @@ for (;;)
|
|
|
08805a |
case OP_ASSERTBACK:
|
|
|
08805a |
case OP_ASSERTBACK_NOT:
|
|
|
08805a |
do cc += GET(cc, 1); while (*cc == OP_ALT);
|
|
|
08805a |
- cc += PRIV(OP_lengths)[*cc];
|
|
|
08805a |
+ cc += 1 + LINK_SIZE;
|
|
|
08805a |
break;
|
|
|
08805a |
|
|
|
08805a |
/* Skip over things that don't match chars */
|
|
|
08805a |
diff --git a/testdata/testinput2 b/testdata/testinput2
|
|
|
08805a |
index bb11212..1b83cf2 100644
|
|
|
08805a |
--- a/testdata/testinput2
|
|
|
08805a |
+++ b/testdata/testinput2
|
|
|
08805a |
@@ -3822,4 +3822,7 @@ settings of the anchored and startline bits. --/
|
|
|
08805a |
|
|
|
08805a |
/(?J:(?|(:(?|(?'R')(\k'R')|((?'R')))H'Rk'Rf)|s(?'R')))/
|
|
|
08805a |
|
|
|
08805a |
+".*?\h.+.\.+\R*?\xd(?i)(?=!(?=b`b`b`\`b\xa9b!)`\a`bbbbbbbbbbbbb`bbbbbbbbbbbb*R\x85bbbbbbb\C?{((?2)(?))((
|
|
|
08805a |
+\H){8(?<=(?1){29}\xa8bbbb\x16\xd\xc6^($(?
|
|
|
08805a |
+
|
|
|
08805a |
/-- End of testinput2 --/
|
|
|
08805a |
diff --git a/testdata/testoutput2 b/testdata/testoutput2
|
|
|
08805a |
index 2dd2381..e33b4e2 100644
|
|
|
08805a |
--- a/testdata/testoutput2
|
|
|
08805a |
+++ b/testdata/testoutput2
|
|
|
08805a |
@@ -12519,4 +12519,7 @@ No match
|
|
|
08805a |
|
|
|
08805a |
/(?J:(?|(:(?|(?'R')(\k'R')|((?'R')))H'Rk'Rf)|s(?'R')))/
|
|
|
08805a |
|
|
|
08805a |
+".*?\h.+.\.+\R*?\xd(?i)(?=!(?=b`b`b`\`b\xa9b!)`\a`bbbbbbbbbbbbb`bbbbbbbbbbbb*R\x85bbbbbbb\C?{((?2)(?))((
|
|
|
08805a |
+\H){8(?<=(?1){29}\xa8bbbb\x16\xd\xc6^($(?
|
|
|
08805a |
+
|
|
|
08805a |
/-- End of testinput2 --/
|
|
|
08805a |
--
|
|
|
08805a |
2.5.5
|
|
|
08805a |
|