From 33a4abfb8b7677640143133edc47b3145b994560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Thu, 19 Jun 2014 09:21:05 +0200 Subject: [PATCH] Fix character class with a literal quotation --- ...ile-of-Qx-.-where-x-is-any-character.patch | 61 +++++++++++++++++++ pcre.spec | 5 ++ 2 files changed, 66 insertions(+) create mode 100644 pcre-8.35-Fix-bad-compile-of-Qx-.-where-x-is-any-character.patch diff --git a/pcre-8.35-Fix-bad-compile-of-Qx-.-where-x-is-any-character.patch b/pcre-8.35-Fix-bad-compile-of-Qx-.-where-x-is-any-character.patch new file mode 100644 index 0000000..3717c0f --- /dev/null +++ b/pcre-8.35-Fix-bad-compile-of-Qx-.-where-x-is-any-character.patch @@ -0,0 +1,61 @@ +From 8d8c3dbadff3d0735ba696acf211c14b3025622f Mon Sep 17 00:00:00 2001 +From: ph10 +Date: Wed, 18 Jun 2014 17:17:03 +0000 +Subject: [PATCH] Fix bad compile of [\Qx]... where x is any character. +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@1487 2f5784b3-3f2a-0410-8824-cb99058d5e15 +Signed-off-by: Petr Písař + +Petr Pisar: Ported to 8.35. + +diff --git a/pcre_compile.c b/pcre_compile.c +index 29d3c29..c44839e 100644 +--- a/pcre_compile.c ++++ b/pcre_compile.c +@@ -5325,7 +5325,7 @@ for (;; ptr++) + whatever repeat count may follow. In the case of reqchar, save the + previous value for reinstating. */ + +- if (class_one_char == 1 && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET) ++ if (!inescq && class_one_char == 1 && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET) + { + ptr++; + zeroreqchar = reqchar; +diff --git a/testdata/testinput1 b/testdata/testinput1 +index c9ebf9f..5513d16 100644 +--- a/testdata/testinput1 ++++ b/testdata/testinput1 +@@ -5708,4 +5708,10 @@ AbcdCBefgBhiBqz + /\sabc/ + \x{0b}abc + ++/[\Qa]\E]+/ ++ aa]] ++ ++/[\Q]a\E]+/ ++ aa]] ++ + /-- End of testinput1 --/ +diff --git a/testdata/testoutput1 b/testdata/testoutput1 +index 6eb7d2d..cfa90d6 100644 +--- a/testdata/testoutput1 ++++ b/testdata/testoutput1 +@@ -9393,4 +9393,12 @@ No match + \x{0b}abc + 0: \x0babc + ++/[\Qa]\E]+/ ++ aa]] ++ 0: aa]] ++ ++/[\Q]a\E]+/ ++ aa]] ++ 0: aa]] ++ + /-- End of testinput1 --/ +-- +1.9.3 + diff --git a/pcre.spec b/pcre.spec index c4ce343..4e24bd0 100644 --- a/pcre.spec +++ b/pcre.spec @@ -23,6 +23,9 @@ Patch3: pcre-8.35-Fix-bad-starting-data-when-char-with-more-than-one-o.patch # Fix not including VT in starting characters for \s if pcre_study() is used, # bug #1111045, upstream bug #1493, in upstream after 8.35 Patch4: pcre-8.35-Fix-not-including-VT-in-starting-characters-for-s.patch +# Fix character class with a literal quotation, bug #1111054, +# upstream bug #1494, in upstream after 8.35 +Patch5: pcre-8.35-Fix-bad-compile-of-Qx-.-where-x-is-any-character.patch BuildRequires: readline-devel # New libtool to get rid of rpath BuildRequires: autoconf, automake, libtool @@ -67,6 +70,7 @@ Utilities demonstrating PCRE capabilities like pcregrep or pcretest. %patch2 -p1 -b .gcc49 %patch3 -p1 -b .starting_data %patch4 -p1 -b .studied_vt +%patch5 -p1 -b .class_with_literal # Because of rpath patch libtoolize --copy --force && autoreconf -vif # One contributor's name is non-UTF-8 @@ -139,6 +143,7 @@ make %{?_smp_mflags} check circumflex in multiline UTF mode (bug #1110620) - Fix not including VT in starting characters for \s if pcre_study() is used (bug #1111045) +- Fix character class with a literal quotation (bug #1111054) * Fri Jun 06 2014 Fedora Release Engineering - 8.35-2.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild