Fix compiling expressions with an isolated \E between an item and its qualifier with auto-callouts
This commit is contained in:
parent
abdb6d0c85
commit
32c1bddd87
@ -0,0 +1,84 @@
|
|||||||
|
From bfc1dfa660c24dc7a75108d934290e50d7db2719 Mon Sep 17 00:00:00 2001
|
||||||
|
From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
|
||||||
|
Date: Fri, 27 Nov 2015 17:41:04 +0000
|
||||||
|
Subject: [PATCH 2/5] Fix bug for isolated \E between an item and its qualifier
|
||||||
|
when auto callout is set.
|
||||||
|
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@1613 2f5784b3-3f2a-0410-8824-cb99058d5e15
|
||||||
|
|
||||||
|
Petr Písař: Ported to 8.38.
|
||||||
|
|
||||||
|
diff --git a/pcre_compile.c b/pcre_compile.c
|
||||||
|
index 3670f1e..5786cd3 100644
|
||||||
|
--- a/pcre_compile.c
|
||||||
|
+++ b/pcre_compile.c
|
||||||
|
@@ -4645,9 +4645,10 @@ for (;; ptr++)
|
||||||
|
goto FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* If in \Q...\E, check for the end; if not, we have a literal */
|
||||||
|
+ /* If in \Q...\E, check for the end; if not, we have a literal. Otherwise an
|
||||||
|
+ isolated \E is ignored. */
|
||||||
|
|
||||||
|
- if (inescq && c != CHAR_NULL)
|
||||||
|
+ if (c != CHAR_NULL)
|
||||||
|
{
|
||||||
|
if (c == CHAR_BACKSLASH && ptr[1] == CHAR_E)
|
||||||
|
{
|
||||||
|
@@ -4655,7 +4656,7 @@ for (;; ptr++)
|
||||||
|
ptr++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
- else
|
||||||
|
+ else if (inescq)
|
||||||
|
{
|
||||||
|
if (previous_callout != NULL)
|
||||||
|
{
|
||||||
|
@@ -4670,7 +4671,6 @@ for (;; ptr++)
|
||||||
|
}
|
||||||
|
goto NORMAL_CHAR;
|
||||||
|
}
|
||||||
|
- /* Control does not reach here. */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* In extended mode, skip white space and comments. We need a loop in order
|
||||||
|
diff --git a/testdata/testinput2 b/testdata/testinput2
|
||||||
|
index 92e3359..e8ca4fe 100644
|
||||||
|
--- a/testdata/testinput2
|
||||||
|
+++ b/testdata/testinput2
|
||||||
|
@@ -4225,4 +4225,6 @@ backtracking verbs. --/
|
||||||
|
|
||||||
|
/L(?#(|++<!(2)?/BCOZ
|
||||||
|
|
||||||
|
+/(A*)\E+/CBZ
|
||||||
|
+
|
||||||
|
/-- End of testinput2 --/
|
||||||
|
diff --git a/testdata/testoutput2 b/testdata/testoutput2
|
||||||
|
index 2cf7a90..09756b8 100644
|
||||||
|
--- a/testdata/testoutput2
|
||||||
|
+++ b/testdata/testoutput2
|
||||||
|
@@ -14610,4 +14610,18 @@ No match
|
||||||
|
End
|
||||||
|
------------------------------------------------------------------
|
||||||
|
|
||||||
|
+/(A*)\E+/CBZ
|
||||||
|
+------------------------------------------------------------------
|
||||||
|
+ Bra
|
||||||
|
+ Callout 255 0 7
|
||||||
|
+ SCBra 1
|
||||||
|
+ Callout 255 1 2
|
||||||
|
+ A*
|
||||||
|
+ Callout 255 3 0
|
||||||
|
+ KetRmax
|
||||||
|
+ Callout 255 7 0
|
||||||
|
+ Ket
|
||||||
|
+ End
|
||||||
|
+------------------------------------------------------------------
|
||||||
|
+
|
||||||
|
/-- End of testinput2 --/
|
||||||
|
--
|
||||||
|
2.4.3
|
||||||
|
|
@ -37,6 +37,10 @@ Patch2: pcre-8.38-Fix-auto-callout-comment-bug.patch
|
|||||||
# Fix compiling expressions with negated classes in UCP mode,
|
# Fix compiling expressions with negated classes in UCP mode,
|
||||||
# upstream bug #1732, fixed in upstream after 8.38
|
# upstream bug #1732, fixed in upstream after 8.38
|
||||||
Patch3: pcre-8.38-Fix-negated-POSIX-class-within-negated-overall-class.patch
|
Patch3: pcre-8.38-Fix-negated-POSIX-class-within-negated-overall-class.patch
|
||||||
|
# Fix compiling expressions with an isolated \E between an item and its
|
||||||
|
# qualifier with auto-callouts, upstream bug #1724,
|
||||||
|
# fixed in upstream after 8.38
|
||||||
|
Patch4: pcre-8.38-Fix-bug-for-isolated-E-between-an-item-and-its-quali.patch
|
||||||
BuildRequires: readline-devel
|
BuildRequires: readline-devel
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
@ -89,6 +93,7 @@ Utilities demonstrating PCRE capabilities like pcregrep or pcretest.
|
|||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
|
%patch4 -p1
|
||||||
# Because of rpath patch
|
# Because of rpath patch
|
||||||
libtoolize --copy --force
|
libtoolize --copy --force
|
||||||
autoreconf -vif
|
autoreconf -vif
|
||||||
@ -163,6 +168,8 @@ make %{?_smp_mflags} check VERBOSE=yes
|
|||||||
* Tue Dec 01 2015 Petr Pisar <ppisar@redhat.com> - 8.38-3
|
* Tue Dec 01 2015 Petr Pisar <ppisar@redhat.com> - 8.38-3
|
||||||
- Fix compiling expressions with negated classes in UCP mode
|
- Fix compiling expressions with negated classes in UCP mode
|
||||||
(upstream bug #1732)
|
(upstream bug #1732)
|
||||||
|
- Fix compiling expressions with an isolated \E between an item and its
|
||||||
|
qualifier with auto-callouts (upstream bug #1724)
|
||||||
|
|
||||||
* Fri Nov 27 2015 Petr Pisar <ppisar@redhat.com> - 8.38-2
|
* Fri Nov 27 2015 Petr Pisar <ppisar@redhat.com> - 8.38-2
|
||||||
- Fix compiling comments with auto-callouts
|
- Fix compiling comments with auto-callouts
|
||||||
|
Loading…
Reference in New Issue
Block a user