86 lines
2.2 KiB
Diff
86 lines
2.2 KiB
Diff
From 35f4457ba4dadc0839df9275adf1fd14e15c28fa Mon Sep 17 00:00:00 2001
|
|
From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
|
|
Date: Wed, 18 Jun 2014 16:31:32 +0000
|
|
Subject: [PATCH] Fix bad starting data when char with more than one other case
|
|
follows circumflex in multiline UTF mode.
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1485 2f5784b3-3f2a-0410-8824-cb99058d5e15
|
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
|
Petr Pisar: Ported to 8.35.
|
|
|
|
diff --git a/pcre_compile.c b/pcre_compile.c
|
|
index 0cf05b9..29d3c29 100644
|
|
--- a/pcre_compile.c
|
|
+++ b/pcre_compile.c
|
|
@@ -4694,7 +4694,8 @@ for (;; ptr++)
|
|
previous = NULL;
|
|
if ((options & PCRE_MULTILINE) != 0)
|
|
{
|
|
- if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
|
|
+ if (firstcharflags == REQ_UNSET)
|
|
+ zerofirstcharflags = firstcharflags = REQ_NONE;
|
|
*code++ = OP_CIRCM;
|
|
}
|
|
else *code++ = OP_CIRC;
|
|
diff --git a/testdata/testinput6 b/testdata/testinput6
|
|
index 7a6a53f..7aebba0 100644
|
|
--- a/testdata/testinput6
|
|
+++ b/testdata/testinput6
|
|
@@ -1493,4 +1493,7 @@
|
|
/[q-u]+/8iW
|
|
Ss\x{17f}
|
|
|
|
+/^s?c/mi8
|
|
+ scat
|
|
+
|
|
/-- End of testinput6 --/
|
|
diff --git a/testdata/testinput7 b/testdata/testinput7
|
|
index 6bd0586..7a66025 100644
|
|
--- a/testdata/testinput7
|
|
+++ b/testdata/testinput7
|
|
@@ -835,4 +835,7 @@ of case for anything other than the ASCII letters. --/
|
|
|
|
/[Q-U]+/8iWBZ
|
|
|
|
+/^s?c/mi8I
|
|
+ scat
|
|
+
|
|
/-- End of testinput7 --/
|
|
diff --git a/testdata/testoutput6 b/testdata/testoutput6
|
|
index f355e60..65bf78f 100644
|
|
--- a/testdata/testoutput6
|
|
+++ b/testdata/testoutput6
|
|
@@ -2457,4 +2457,8 @@ No match
|
|
Ss\x{17f}
|
|
0: Ss\x{17f}
|
|
|
|
+/^s?c/mi8
|
|
+ scat
|
|
+ 0: sc
|
|
+
|
|
/-- End of testinput6 --/
|
|
diff --git a/testdata/testoutput7 b/testdata/testoutput7
|
|
index c64e049..ee46bdb 100644
|
|
--- a/testdata/testoutput7
|
|
+++ b/testdata/testoutput7
|
|
@@ -2287,4 +2287,12 @@ No match
|
|
End
|
|
------------------------------------------------------------------
|
|
|
|
+/^s?c/mi8I
|
|
+Capturing subpattern count = 0
|
|
+Options: caseless multiline utf
|
|
+First char at start or follows newline
|
|
+Need char = 'c' (caseless)
|
|
+ scat
|
|
+ 0: sc
|
|
+
|
|
/-- End of testinput7 --/
|
|
--
|
|
1.9.3
|
|
|