|
|
cb67f2 |
From 17b16354612fa15b0d385e0ac57d0e0b4494ddac Mon Sep 17 00:00:00 2001
|
|
|
cb67f2 |
From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
|
|
|
cb67f2 |
Date: Wed, 18 Jun 2014 16:31:32 +0000
|
|
|
cb67f2 |
Subject: [PATCH] Fix bad starting data when char with more than one other case
|
|
|
cb67f2 |
follows circumflex in multiline UTF mode.
|
|
|
cb67f2 |
MIME-Version: 1.0
|
|
|
cb67f2 |
Content-Type: text/plain; charset=UTF-8
|
|
|
cb67f2 |
Content-Transfer-Encoding: 8bit
|
|
|
cb67f2 |
|
|
|
cb67f2 |
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1485 2f5784b3-3f2a-0410-8824-cb99058d5e15
|
|
|
cb67f2 |
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
cb67f2 |
|
|
|
cb67f2 |
Petr Pisar: Ported to 8.32.
|
|
|
cb67f2 |
|
|
|
cb67f2 |
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
cb67f2 |
---
|
|
|
cb67f2 |
pcre_compile.c | 3 ++-
|
|
|
cb67f2 |
testdata/testinput6 | 3 +++
|
|
|
cb67f2 |
testdata/testinput7 | 3 +++
|
|
|
cb67f2 |
testdata/testoutput6 | 4 ++++
|
|
|
cb67f2 |
testdata/testoutput7 | 8 ++++++++
|
|
|
cb67f2 |
5 files changed, 20 insertions(+), 1 deletion(-)
|
|
|
cb67f2 |
|
|
|
cb67f2 |
diff --git a/pcre_compile.c b/pcre_compile.c
|
|
|
cb67f2 |
index 5f0c8ed..7a2d7c7 100644
|
|
|
cb67f2 |
--- a/pcre_compile.c
|
|
|
cb67f2 |
+++ b/pcre_compile.c
|
|
|
cb67f2 |
@@ -3991,7 +3991,8 @@ for (;; ptr++)
|
|
|
cb67f2 |
previous = NULL;
|
|
|
cb67f2 |
if ((options & PCRE_MULTILINE) != 0)
|
|
|
cb67f2 |
{
|
|
|
cb67f2 |
- if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
|
|
|
cb67f2 |
+ if (firstcharflags == REQ_UNSET)
|
|
|
cb67f2 |
+ zerofirstcharflags = firstcharflags = REQ_NONE;
|
|
|
cb67f2 |
*code++ = OP_CIRCM;
|
|
|
cb67f2 |
}
|
|
|
cb67f2 |
else *code++ = OP_CIRC;
|
|
|
cb67f2 |
diff --git a/testdata/testinput6 b/testdata/testinput6
|
|
|
cb67f2 |
index a4bfb3c..219a30e 100644
|
|
|
cb67f2 |
--- a/testdata/testinput6
|
|
|
cb67f2 |
+++ b/testdata/testinput6
|
|
|
cb67f2 |
@@ -1316,4 +1316,7 @@
|
|
|
cb67f2 |
/\x{017f}+/8i
|
|
|
cb67f2 |
\x{0053}\x{0073}\x{017f}
|
|
|
cb67f2 |
|
|
|
cb67f2 |
+/^s?c/mi8
|
|
|
cb67f2 |
+ scat
|
|
|
cb67f2 |
+
|
|
|
cb67f2 |
/-- End of testinput6 --/
|
|
|
cb67f2 |
diff --git a/testdata/testinput7 b/testdata/testinput7
|
|
|
cb67f2 |
index b265f1f..252d246 100644
|
|
|
cb67f2 |
--- a/testdata/testinput7
|
|
|
cb67f2 |
+++ b/testdata/testinput7
|
|
|
cb67f2 |
@@ -669,4 +669,7 @@ of case for anything other than the ASCII letters. --/
|
|
|
cb67f2 |
/is{2}t/8i
|
|
|
cb67f2 |
iskt
|
|
|
cb67f2 |
|
|
|
cb67f2 |
+/^s?c/mi8I
|
|
|
cb67f2 |
+ scat
|
|
|
cb67f2 |
+
|
|
|
cb67f2 |
/-- End of testinput7 --/
|
|
|
cb67f2 |
diff --git a/testdata/testoutput6 b/testdata/testoutput6
|
|
|
cb67f2 |
index 0182746..090d23f 100644
|
|
|
cb67f2 |
--- a/testdata/testoutput6
|
|
|
cb67f2 |
+++ b/testdata/testoutput6
|
|
|
cb67f2 |
@@ -2134,4 +2134,8 @@ No match
|
|
|
cb67f2 |
\x{0053}\x{0073}\x{017f}
|
|
|
cb67f2 |
0: Ss\x{17f}
|
|
|
cb67f2 |
|
|
|
cb67f2 |
+/^s?c/mi8
|
|
|
cb67f2 |
+ scat
|
|
|
cb67f2 |
+ 0: sc
|
|
|
cb67f2 |
+
|
|
|
cb67f2 |
/-- End of testinput6 --/
|
|
|
cb67f2 |
diff --git a/testdata/testoutput7 b/testdata/testoutput7
|
|
|
cb67f2 |
index 4f8b7b9..5f0f546 100644
|
|
|
cb67f2 |
--- a/testdata/testoutput7
|
|
|
cb67f2 |
+++ b/testdata/testoutput7
|
|
|
cb67f2 |
@@ -1470,4 +1470,12 @@ No match
|
|
|
cb67f2 |
iskt
|
|
|
cb67f2 |
No match
|
|
|
cb67f2 |
|
|
|
cb67f2 |
+/^s?c/mi8I
|
|
|
cb67f2 |
+Capturing subpattern count = 0
|
|
|
cb67f2 |
+Options: caseless multiline utf
|
|
|
cb67f2 |
+First char at start or follows newline
|
|
|
cb67f2 |
+Need char = 'c' (caseless)
|
|
|
cb67f2 |
+ scat
|
|
|
cb67f2 |
+ 0: sc
|
|
|
cb67f2 |
+
|
|
|
cb67f2 |
/-- End of testinput7 --/
|
|
|
cb67f2 |
--
|
|
|
cb67f2 |
1.9.3
|
|
|
cb67f2 |
|