Fix repeated forward reference
This commit is contained in:
parent
3c7545a57b
commit
b41a1da88c
69
pcre-8.20-forward_reference.patch
Normal file
69
pcre-8.20-forward_reference.patch
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
Fix repeated forward reference needed character bug
|
||||||
|
|
||||||
|
From:
|
||||||
|
r762 | ph10 | 2011-11-22 14:36:51 +0100 (Út, 22 lis 2011) | 2 lines
|
||||||
|
|
||||||
|
16. A repeated forward reference in a pattern such as (a)(?2){2}(.) was
|
||||||
|
incorrectly expecting the subject to contain another "a" after the start.
|
||||||
|
|
||||||
|
Petr Pisar: Changelog removed.
|
||||||
|
See <http://lists.pcre.org/lurker/message/20111121.203922.3cfd476e.en.html>.
|
||||||
|
|
||||||
|
|
||||||
|
Index: testdata/testoutput11
|
||||||
|
===================================================================
|
||||||
|
--- testdata/testoutput11 (revision 761)
|
||||||
|
+++ testdata/testoutput11 (revision 762)
|
||||||
|
@@ -1441,4 +1441,10 @@
|
||||||
|
xabcd
|
||||||
|
0: c
|
||||||
|
|
||||||
|
+/(a)(?2){2}(.)/
|
||||||
|
+ abcd
|
||||||
|
+ 0: abcd
|
||||||
|
+ 1: a
|
||||||
|
+ 2: d
|
||||||
|
+
|
||||||
|
/-- End of testinput11 --/
|
||||||
|
Index: testdata/testinput11
|
||||||
|
===================================================================
|
||||||
|
--- testdata/testinput11 (revision 761)
|
||||||
|
+++ testdata/testinput11 (revision 762)
|
||||||
|
@@ -800,4 +800,7 @@
|
||||||
|
/(?<=a(*THEN)b)c/
|
||||||
|
xabcd
|
||||||
|
|
||||||
|
+/(a)(?2){2}(.)/
|
||||||
|
+ abcd
|
||||||
|
+
|
||||||
|
/-- End of testinput11 --/
|
||||||
|
Index: pcre_compile.c
|
||||||
|
===================================================================
|
||||||
|
--- pcre_compile.c (revision 761)
|
||||||
|
+++ pcre_compile.c (revision 762)
|
||||||
|
@@ -4884,7 +4884,8 @@
|
||||||
|
*lengthptr += delta;
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* This is compiling for real */
|
||||||
|
+ /* This is compiling for real. If there is a set first byte for
|
||||||
|
+ the group, and we have not yet set a "required byte", set it. */
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
@@ -6015,11 +6016,14 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* Insert the recursion/subroutine item. */
|
||||||
|
+ /* Insert the recursion/subroutine item. It does not have a set first
|
||||||
|
+ byte (relevant if it is repeated, because it will then be wrapped
|
||||||
|
+ with ONCE brackets). */
|
||||||
|
|
||||||
|
*code = OP_RECURSE;
|
||||||
|
PUT(code, 1, (int)(called - cd->start_code));
|
||||||
|
code += 1 + LINK_SIZE;
|
||||||
|
+ groupsetfirstbyte = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Can't determine a first byte now */
|
@ -1,7 +1,7 @@
|
|||||||
# This is stable release: %%global rcversion RC3
|
# This is stable release: %%global rcversion RC3
|
||||||
Name: pcre
|
Name: pcre
|
||||||
Version: 8.20
|
Version: 8.20
|
||||||
Release: %{?rcversion:0.}4%{?rcversion:.%rcversion}%{?dist}
|
Release: %{?rcversion:0.}5%{?rcversion:.%rcversion}%{?dist}
|
||||||
%global myversion %{version}%{?rcversion:-%rcversion}
|
%global myversion %{version}%{?rcversion:-%rcversion}
|
||||||
Summary: Perl-compatible regular expression library
|
Summary: Perl-compatible regular expression library
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
@ -15,6 +15,8 @@ Patch1: pcre-8.20-refused_spelling_terminated.patch
|
|||||||
Patch2: pcre-8.20-lookbehind.patch
|
Patch2: pcre-8.20-lookbehind.patch
|
||||||
# Fix other look-behind regression, in upstream after 8.20.
|
# Fix other look-behind regression, in upstream after 8.20.
|
||||||
Patch3: pcre-8.20-lookbehind-2.patch
|
Patch3: pcre-8.20-lookbehind-2.patch
|
||||||
|
# Fix repeated forward reference, in upstream after 8.20.
|
||||||
|
Patch4: pcre-8.20-forward_reference.patch
|
||||||
BuildRequires: readline-devel
|
BuildRequires: readline-devel
|
||||||
# New libtool to get rid of rpath
|
# New libtool to get rid of rpath
|
||||||
BuildRequires: autoconf, automake, libtool
|
BuildRequires: autoconf, automake, libtool
|
||||||
@ -57,6 +59,7 @@ libtoolize --copy --force && autoreconf
|
|||||||
%patch1 -p1 -b .terminated_typos
|
%patch1 -p1 -b .terminated_typos
|
||||||
%patch2 -p1 -b .lookbehind
|
%patch2 -p1 -b .lookbehind
|
||||||
%patch3 -p1 -b .lookbehind3
|
%patch3 -p1 -b .lookbehind3
|
||||||
|
%patch4 -p0 -b .forward_reference
|
||||||
# One contributor's name is non-UTF-8
|
# One contributor's name is non-UTF-8
|
||||||
for F in ChangeLog; do
|
for F in ChangeLog; do
|
||||||
iconv -f latin1 -t utf8 "$F" >"${F}.utf8"
|
iconv -f latin1 -t utf8 "$F" >"${F}.utf8"
|
||||||
@ -127,6 +130,9 @@ make check
|
|||||||
%{_mandir}/man1/pcretest.*
|
%{_mandir}/man1/pcretest.*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 22 2011 Petr Pisar <ppisar@redhat.com> - 8.20-5
|
||||||
|
- Fix repeated forward reference (bug #755969)
|
||||||
|
|
||||||
* Wed Nov 16 2011 Petr Pisar <ppisar@redhat.com> - 8.20-4
|
* Wed Nov 16 2011 Petr Pisar <ppisar@redhat.com> - 8.20-4
|
||||||
- Fix other look-behind regressions
|
- Fix other look-behind regressions
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user