Fix autopossessifying a repeated negative class with no characters less than 256 that is followed by a positive class with only characters less than 256
This commit is contained in:
parent
972b635dbd
commit
d568a9031a
65
pcre-8.42-Fix-bad-auto-possessify-for-certain-classes.patch
Normal file
65
pcre-8.42-Fix-bad-auto-possessify-for-certain-classes.patch
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
From 952cac5f4a17e52aec7d0536f405b25428367840 Mon Sep 17 00:00:00 2001
|
||||||
|
From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
|
||||||
|
Date: Fri, 17 Aug 2018 14:50:21 +0000
|
||||||
|
Subject: [PATCH] Fix bad auto-possessify for certain classes.
|
||||||
|
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@1738 2f5784b3-3f2a-0410-8824-cb99058d5e15
|
||||||
|
Petr Písař: Ported to 8.42.
|
||||||
|
---
|
||||||
|
pcre_compile.c | 4 ++--
|
||||||
|
testdata/testinput4 | 3 +++
|
||||||
|
testdata/testoutput4 | 4 ++++
|
||||||
|
|
||||||
|
diff --git a/pcre_compile.c b/pcre_compile.c
|
||||||
|
index 6dd8886..3991d6c 100644
|
||||||
|
--- a/pcre_compile.c
|
||||||
|
+++ b/pcre_compile.c
|
||||||
|
@@ -6,7 +6,7 @@
|
||||||
|
and semantics are as close as possible to those of the Perl 5 language.
|
||||||
|
|
||||||
|
Written by Philip Hazel
|
||||||
|
- Copyright (c) 1997-2016 University of Cambridge
|
||||||
|
+ Copyright (c) 1997-2018 University of Cambridge
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
@@ -3299,7 +3299,7 @@ for(;;)
|
||||||
|
if ((*xclass_flags & XCL_MAP) == 0)
|
||||||
|
{
|
||||||
|
/* No bits are set for characters < 256. */
|
||||||
|
- if (list[1] == 0) return TRUE;
|
||||||
|
+ if (list[1] == 0) return (*xclass_flags & XCL_NOT) == 0;
|
||||||
|
/* Might be an empty repeat. */
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
diff --git a/testdata/testinput4 b/testdata/testinput4
|
||||||
|
index 8bdbdac..63368c0 100644
|
||||||
|
--- a/testdata/testinput4
|
||||||
|
+++ b/testdata/testinput4
|
||||||
|
@@ -727,4 +727,7 @@
|
||||||
|
/\C(\W?ſ)'?{{/8
|
||||||
|
\\C(\\W?ſ)'?{{
|
||||||
|
|
||||||
|
+/[^\x{100}-\x{ffff}]*[\x80-\xff]/8
|
||||||
|
+ \x{99}\x{99}\x{99}
|
||||||
|
+
|
||||||
|
/-- End of testinput4 --/
|
||||||
|
diff --git a/testdata/testoutput4 b/testdata/testoutput4
|
||||||
|
index d43c123..69e812c 100644
|
||||||
|
--- a/testdata/testoutput4
|
||||||
|
+++ b/testdata/testoutput4
|
||||||
|
@@ -1277,4 +1277,8 @@ No match
|
||||||
|
\\C(\\W?ſ)'?{{
|
||||||
|
No match
|
||||||
|
|
||||||
|
+/[^\x{100}-\x{ffff}]*[\x80-\xff]/8
|
||||||
|
+ \x{99}\x{99}\x{99}
|
||||||
|
+ 0: \x{99}\x{99}\x{99}
|
||||||
|
+
|
||||||
|
/-- End of testinput4 --/
|
||||||
|
--
|
||||||
|
2.14.4
|
||||||
|
|
12
pcre.spec
12
pcre.spec
@ -2,7 +2,7 @@
|
|||||||
#%%global rcversion RC1
|
#%%global rcversion RC1
|
||||||
Name: pcre
|
Name: pcre
|
||||||
Version: 8.42
|
Version: 8.42
|
||||||
Release: %{?rcversion:0.}2%{?rcversion:.%rcversion}%{?dist}.1
|
Release: %{?rcversion:0.}3%{?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
|
||||||
## Source package only:
|
## Source package only:
|
||||||
@ -41,6 +41,10 @@ Patch3: pcre-8.42-Fix-two-C-wrapper-bugs-unnoticed-for-years.patch
|
|||||||
# Fix an error message and locale handling in pcregrep tool,
|
# Fix an error message and locale handling in pcregrep tool,
|
||||||
# in upstream after 8.42
|
# in upstream after 8.42
|
||||||
Patch4: pcre-8.42-Fix-typos-in-pcrgrep.patch
|
Patch4: pcre-8.42-Fix-typos-in-pcrgrep.patch
|
||||||
|
# Fix autopossessifying a repeated negative class with no characters less than
|
||||||
|
# 256 that is followed by a positive class with only characters less than 256,
|
||||||
|
# upstream bug #2300, in upstream after 8.42
|
||||||
|
Patch5: pcre-8.42-Fix-bad-auto-possessify-for-certain-classes.patch
|
||||||
BuildRequires: readline-devel
|
BuildRequires: readline-devel
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
@ -127,6 +131,7 @@ Utilities demonstrating PCRE capabilities like pcregrep or pcretest.
|
|||||||
%patch2 -p2
|
%patch2 -p2
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
|
%patch5 -p1
|
||||||
# Because of rpath patch
|
# Because of rpath patch
|
||||||
libtoolize --copy --force
|
libtoolize --copy --force
|
||||||
autoreconf -vif
|
autoreconf -vif
|
||||||
@ -221,6 +226,11 @@ make %{?_smp_mflags} check VERBOSE=yes
|
|||||||
%{_mandir}/man1/pcretest.*
|
%{_mandir}/man1/pcretest.*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Aug 20 2018 Petr Pisar <ppisar@redhat.com> - 8.42-3
|
||||||
|
- Fix autopossessifying a repeated negative class with no characters less than
|
||||||
|
256 that is followed by a positive class with only characters less than 256
|
||||||
|
(upstream bug #2300)
|
||||||
|
|
||||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 8.42-2.1
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 8.42-2.1
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user