From 191adc19d507d0b5dbc9aaf6c266620d165b137b Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 19 2015 03:42:07 +0000 Subject: import pcre-8.32-15.el7 --- diff --git a/SOURCES/pcre-8.32-Fix-bad-compile-of-Qx-.-where-x-is-any-character.patch b/SOURCES/pcre-8.32-Fix-bad-compile-of-Qx-.-where-x-is-any-character.patch new file mode 100644 index 0000000..77a7de8 --- /dev/null +++ b/SOURCES/pcre-8.32-Fix-bad-compile-of-Qx-.-where-x-is-any-character.patch @@ -0,0 +1,68 @@ +From 5561a6a57fc7f663e9d88e9d1beab4de8725f49a 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.32. + +Signed-off-by: Petr Písař +--- + pcre_compile.c | 2 +- + testdata/testinput1 | 6 ++++++ + testdata/testoutput1 | 8 ++++++++ + 3 files changed, 15 insertions(+), 1 deletion(-) + +diff --git a/pcre_compile.c b/pcre_compile.c +index 7a2d7c7..8926099 100644 +--- a/pcre_compile.c ++++ b/pcre_compile.c +@@ -4543,7 +4543,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 e6d048a..a125dee 100644 +--- a/testdata/testinput1 ++++ b/testdata/testinput1 +@@ -5303,4 +5303,10 @@ name were given. ---/ + "(?>.*?)foo" + abcdfooxyz + ++/[\Qa]\E]+/ ++ aa]] ++ ++/[\Q]a\E]+/ ++ aa]] ++ + /-- End of testinput1 --/ +diff --git a/testdata/testoutput1 b/testdata/testoutput1 +index 8310e94..69b3d37 100644 +--- a/testdata/testoutput1 ++++ b/testdata/testoutput1 +@@ -8795,4 +8795,12 @@ No match + abcdfooxyz + 0: foo + ++/[\Qa]\E]+/ ++ aa]] ++ 0: aa]] ++ ++/[\Q]a\E]+/ ++ aa]] ++ 0: aa]] ++ + /-- End of testinput1 --/ +-- +1.9.3 + diff --git a/SOURCES/pcre-8.32-Fix-bad-starting-data-when-char-with-more-than-one-o.patch b/SOURCES/pcre-8.32-Fix-bad-starting-data-when-char-with-more-than-one-o.patch new file mode 100644 index 0000000..c033953 --- /dev/null +++ b/SOURCES/pcre-8.32-Fix-bad-starting-data-when-char-with-more-than-one-o.patch @@ -0,0 +1,94 @@ +From 17b16354612fa15b0d385e0ac57d0e0b4494ddac Mon Sep 17 00:00:00 2001 +From: ph10 +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ř + +Petr Pisar: Ported to 8.32. + +Signed-off-by: Petr Písař +--- + pcre_compile.c | 3 ++- + testdata/testinput6 | 3 +++ + testdata/testinput7 | 3 +++ + testdata/testoutput6 | 4 ++++ + testdata/testoutput7 | 8 ++++++++ + 5 files changed, 20 insertions(+), 1 deletion(-) + +diff --git a/pcre_compile.c b/pcre_compile.c +index 5f0c8ed..7a2d7c7 100644 +--- a/pcre_compile.c ++++ b/pcre_compile.c +@@ -3991,7 +3991,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 a4bfb3c..219a30e 100644 +--- a/testdata/testinput6 ++++ b/testdata/testinput6 +@@ -1316,4 +1316,7 @@ + /\x{017f}+/8i + \x{0053}\x{0073}\x{017f} + ++/^s?c/mi8 ++ scat ++ + /-- End of testinput6 --/ +diff --git a/testdata/testinput7 b/testdata/testinput7 +index b265f1f..252d246 100644 +--- a/testdata/testinput7 ++++ b/testdata/testinput7 +@@ -669,4 +669,7 @@ of case for anything other than the ASCII letters. --/ + /is{2}t/8i + iskt + ++/^s?c/mi8I ++ scat ++ + /-- End of testinput7 --/ +diff --git a/testdata/testoutput6 b/testdata/testoutput6 +index 0182746..090d23f 100644 +--- a/testdata/testoutput6 ++++ b/testdata/testoutput6 +@@ -2134,4 +2134,8 @@ No match + \x{0053}\x{0073}\x{017f} + 0: Ss\x{17f} + ++/^s?c/mi8 ++ scat ++ 0: sc ++ + /-- End of testinput6 --/ +diff --git a/testdata/testoutput7 b/testdata/testoutput7 +index 4f8b7b9..5f0f546 100644 +--- a/testdata/testoutput7 ++++ b/testdata/testoutput7 +@@ -1470,4 +1470,12 @@ No match + iskt + No match + ++/^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 + diff --git a/SOURCES/pcre-8.32-Fix-bug-when-there-are-unset-groups-prior-to-ACCEPT-.patch b/SOURCES/pcre-8.32-Fix-bug-when-there-are-unset-groups-prior-to-ACCEPT-.patch new file mode 100644 index 0000000..243f189 --- /dev/null +++ b/SOURCES/pcre-8.32-Fix-bug-when-there-are-unset-groups-prior-to-ACCEPT-.patch @@ -0,0 +1,78 @@ +From 69285b9e6fa30790d5fc0bcb3d2bcb1713836093 Mon Sep 17 00:00:00 2001 +From: ph10 +Date: Wed, 5 Nov 2014 15:08:03 +0000 +Subject: [PATCH] Fix bug when there are unset groups prior to (*ACCEPT) within + a capturing group. +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@1510 2f5784b3-3f2a-0410-8824-cb99058d5e15 +Signed-off-by: Petr Písař + +Petr Pisar: Ported to 8.32 + +Signed-off-by: Petr Písař +--- + pcre_exec.c | 13 ++++++++++++- + testdata/testinput1 | 3 +++ + testdata/testoutput1 | 9 +++++++++ + 3 files changed, 24 insertions(+), 1 deletion(-) + +diff --git a/pcre_exec.c b/pcre_exec.c +index 478a026..74a2b49 100644 +--- a/pcre_exec.c ++++ b/pcre_exec.c +@@ -1539,7 +1539,18 @@ for (;;) + md->offset_vector[offset] = + md->offset_vector[md->offset_end - number]; + md->offset_vector[offset+1] = (int)(eptr - md->start_subject); +- if (offset_top <= offset) offset_top = offset + 2; ++ ++ /* If this group is at or above the current highwater mark, ensure that ++ any groups between the current high water mark and this group are marked ++ unset and then update the high water mark. */ ++ ++ if (offset >= offset_top) ++ { ++ register int *iptr = md->offset_vector + offset_top; ++ register int *iend = md->offset_vector + offset; ++ while (iptr < iend) *iptr++ = -1; ++ offset_top = offset + 2; ++ } + } + ecode += 1 + IMM2_SIZE; + break; +diff --git a/testdata/testinput1 b/testdata/testinput1 +index c248758..3e1061e 100644 +--- a/testdata/testinput1 ++++ b/testdata/testinput1 +@@ -5318,4 +5318,7 @@ name were given. ---/ + '\A(?:[^\"]++|\"(?:[^\"]++|\"\")++\")++' + NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED + ++/(?:((abcd))|(((?:(?:(?:(?:abc|(?:abcdef))))b)abcdefghi)abc)|((*ACCEPT)))/ ++ 1234abcd ++ + /-- End of testinput1 --/ +diff --git a/testdata/testoutput1 b/testdata/testoutput1 +index 9741d1a..5015448 100644 +--- a/testdata/testoutput1 ++++ b/testdata/testoutput1 +@@ -8815,4 +8815,13 @@ No match + NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED + 0: NON QUOTED "QUOT""ED" AFTER + ++/(?:((abcd))|(((?:(?:(?:(?:abc|(?:abcdef))))b)abcdefghi)abc)|((*ACCEPT)))/ ++ 1234abcd ++ 0: ++ 1: ++ 2: ++ 3: ++ 4: ++ 5: ++ + /-- End of testinput1 --/ +-- +2.1.0 + diff --git a/SOURCES/pcre-8.32-Fix-compiler-crash-misbehaviour-for-zero-repeated-gr.patch b/SOURCES/pcre-8.32-Fix-compiler-crash-misbehaviour-for-zero-repeated-gr.patch new file mode 100644 index 0000000..e5f9309 --- /dev/null +++ b/SOURCES/pcre-8.32-Fix-compiler-crash-misbehaviour-for-zero-repeated-gr.patch @@ -0,0 +1,206 @@ +From a9d4fbce8772d129902eeb3d9a643e3f5943d818 Mon Sep 17 00:00:00 2001 +From: ph10 +Date: Sat, 12 Jul 2014 18:22:54 +0000 +Subject: [PATCH] Fix compiler crash/misbehaviour for zero-repeated groups that + include a recursive back reference. +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@1495 2f5784b3-3f2a-0410-8824-cb99058d5e15 + +Petr Pisar: Ported to 8.32. +Note: The testoutput2 expect 'a?+', while it returns 'a?'. I raised +the anomaly to the upstream +. + +Signed-off-by: Petr Písař +--- + pcre_compile.c | 6 +++++- + testdata/testinput11 | 2 ++ + testdata/testinput2 | 2 ++ + testdata/testoutput11-16 | 24 ++++++++++++++++++++++++ + testdata/testoutput11-32 | 24 ++++++++++++++++++++++++ + testdata/testoutput11-8 | 24 ++++++++++++++++++++++++ + testdata/testoutput2 | 24 ++++++++++++++++++++++++ + 7 files changed, 105 insertions(+), 1 deletion(-) + +diff --git a/pcre_compile.c b/pcre_compile.c +index 8926099..0de3747 100644 +--- a/pcre_compile.c ++++ b/pcre_compile.c +@@ -7316,12 +7316,16 @@ for (;;) + + /* If it was a capturing subpattern, check to see if it contained any + recursive back references. If so, we must wrap it in atomic brackets. +- In any event, remove the block from the chain. */ ++ Because we are moving code along, we must ensure that any pending recursive ++ references are updated. In any event, remove the block from the chain. */ + + if (capnumber > 0) + { + if (cd->open_caps->flag) + { ++ *code = OP_END; ++ adjust_recurse(start_bracket, 1 + LINK_SIZE, ++ (options & PCRE_UTF8) != 0, cd, cd->hwm); + memmove(start_bracket + 1 + LINK_SIZE, start_bracket, + IN_UCHARS(code - start_bracket)); + *start_bracket = OP_ONCE; +diff --git a/testdata/testinput11 b/testdata/testinput11 +index 391ada7..7e8e542 100644 +--- a/testdata/testinput11 ++++ b/testdata/testinput11 +@@ -132,4 +132,6 @@ is required for these tests. --/ + + /abc(d|e)(*THEN)x(123(*THEN)4|567(b|q)(*THEN)xx)/B + ++/(((a\2)|(a*)\g<-1>))*a?/B ++ + /-- End of testinput11 --/ +diff --git a/testdata/testinput2 b/testdata/testinput2 +index 0835a98..e6d0e87 100644 +--- a/testdata/testinput2 ++++ b/testdata/testinput2 +@@ -3816,4 +3816,6 @@ settings of the anchored and startline bits. --/ + "(?(?=)?==)(((((((((?=)))))))))" + a + ++/(((a\2)|(a*)\g<-1>))*a?/BZ ++ + /-- End of testinput2 --/ +diff --git a/testdata/testoutput11-16 b/testdata/testoutput11-16 +index dff72b9..de64e37 100644 +--- a/testdata/testoutput11-16 ++++ b/testdata/testoutput11-16 +@@ -710,4 +710,28 @@ Memory allocation (code space): 14 + 62 End + ------------------------------------------------------------------ + ++/(((a\2)|(a*)\g<-1>))*a?/B ++------------------------------------------------------------------ ++ 0 39 Bra ++ 2 Brazero ++ 3 32 SCBra 1 ++ 6 27 Once ++ 8 12 CBra 2 ++ 11 7 CBra 3 ++ 14 a ++ 16 \2 ++ 18 7 Ket ++ 20 11 Alt ++ 22 5 CBra 4 ++ 25 a* ++ 27 5 Ket ++ 29 22 Recurse ++ 31 23 Ket ++ 33 27 Ket ++ 35 32 KetRmax ++ 37 a? ++ 39 39 Ket ++ 41 End ++------------------------------------------------------------------ ++ + /-- End of testinput11 --/ +diff --git a/testdata/testoutput11-32 b/testdata/testoutput11-32 +index 8335fb8..0d32e2f 100644 +--- a/testdata/testoutput11-32 ++++ b/testdata/testoutput11-32 +@@ -710,4 +710,28 @@ Memory allocation (code space): 28 + 62 End + ------------------------------------------------------------------ + ++/(((a\2)|(a*)\g<-1>))*a?/B ++------------------------------------------------------------------ ++ 0 39 Bra ++ 2 Brazero ++ 3 32 SCBra 1 ++ 6 27 Once ++ 8 12 CBra 2 ++ 11 7 CBra 3 ++ 14 a ++ 16 \2 ++ 18 7 Ket ++ 20 11 Alt ++ 22 5 CBra 4 ++ 25 a* ++ 27 5 Ket ++ 29 22 Recurse ++ 31 23 Ket ++ 33 27 Ket ++ 35 32 KetRmax ++ 37 a? ++ 39 39 Ket ++ 41 End ++------------------------------------------------------------------ ++ + /-- End of testinput11 --/ +diff --git a/testdata/testoutput11-8 b/testdata/testoutput11-8 +index c1c85f9..9447fb6 100644 +--- a/testdata/testoutput11-8 ++++ b/testdata/testoutput11-8 +@@ -710,4 +710,28 @@ Memory allocation (code space): 10 + 76 End + ------------------------------------------------------------------ + ++/(((a\2)|(a*)\g<-1>))*a?/B ++------------------------------------------------------------------ ++ 0 57 Bra ++ 3 Brazero ++ 4 48 SCBra 1 ++ 9 40 Once ++ 12 18 CBra 2 ++ 17 10 CBra 3 ++ 22 a ++ 24 \2 ++ 27 10 Ket ++ 30 16 Alt ++ 33 7 CBra 4 ++ 38 a* ++ 40 7 Ket ++ 43 33 Recurse ++ 46 34 Ket ++ 49 40 Ket ++ 52 48 KetRmax ++ 55 a? ++ 57 57 Ket ++ 60 End ++------------------------------------------------------------------ ++ + /-- End of testinput11 --/ +diff --git a/testdata/testoutput2 b/testdata/testoutput2 +index 66c914f..2a2b577 100644 +--- a/testdata/testoutput2 ++++ b/testdata/testoutput2 +@@ -12491,4 +12491,28 @@ No set of starting bytes + a + No match + ++/(((a\2)|(a*)\g<-1>))*a?/BZ ++------------------------------------------------------------------ ++ Bra ++ Brazero ++ SCBra 1 ++ Once ++ CBra 2 ++ CBra 3 ++ a ++ \2 ++ Ket ++ Alt ++ CBra 4 ++ a* ++ Ket ++ Recurse ++ Ket ++ Ket ++ KetRmax ++ a? ++ Ket ++ End ++------------------------------------------------------------------ ++ + /-- End of testinput2 --/ +-- +2.1.0 + diff --git a/SOURCES/pcre-8.33-Fix-empty-matching-possessive-zero-repeat-groups-bug.patch b/SOURCES/pcre-8.33-Fix-empty-matching-possessive-zero-repeat-groups-bug.patch new file mode 100644 index 0000000..a2db8d0 --- /dev/null +++ b/SOURCES/pcre-8.33-Fix-empty-matching-possessive-zero-repeat-groups-bug.patch @@ -0,0 +1,187 @@ +From 93c413c5fac105d90f77ab5d03e31e0f64fc6142 Mon Sep 17 00:00:00 2001 +From: ph10 +Date: Tue, 27 May 2014 13:18:31 +0000 +Subject: [PATCH] Fix empty-matching possessive zero-repeat groups bug. +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@1478 2f5784b3-3f2a-0410-8824-cb99058d5e15 + +Petr Pisar: Ported to 8.33. + +Signed-off-by: Petr Písař +--- + pcre_exec.c | 41 ++++++++++++++++++++++++++--------------- + testdata/testinput1 | 9 +++++++++ + testdata/testinput8 | 6 ++++++ + testdata/testoutput1 | 12 ++++++++++++ + testdata/testoutput8 | 8 ++++++++ + 5 files changed, 61 insertions(+), 15 deletions(-) + +diff --git a/pcre_exec.c b/pcre_exec.c +index ab76d02..481e899 100644 +--- a/pcre_exec.c ++++ b/pcre_exec.c +@@ -1169,10 +1169,15 @@ for (;;) + if (rrc == MATCH_KETRPOS) + { + offset_top = md->end_offset_top; +- eptr = md->end_match_ptr; + ecode = md->start_code + code_offset; + save_capture_last = md->capture_last; + matched_once = TRUE; ++ if (eptr == md->end_match_ptr) /* Matched an empty string */ ++ { ++ do ecode += GET(ecode, 1); while (*ecode == OP_ALT); ++ break; ++ } ++ eptr = md->end_match_ptr; + continue; + } + +@@ -1242,9 +1247,14 @@ for (;;) + if (rrc == MATCH_KETRPOS) + { + offset_top = md->end_offset_top; +- eptr = md->end_match_ptr; + ecode = md->start_code + code_offset; + matched_once = TRUE; ++ if (eptr == md->end_match_ptr) /* Matched an empty string */ ++ { ++ do ecode += GET(ecode, 1); while (*ecode == OP_ALT); ++ break; ++ } ++ eptr = md->end_match_ptr; + continue; + } + +@@ -1976,7 +1986,7 @@ for (;;) + case OP_KETRMAX: + case OP_KETRPOS: + prev = ecode - GET(ecode, 1); +- ++ + /* If this was a group that remembered the subject start, in order to break + infinite repeats of empty string matches, retrieve the subject start from + the chain. Otherwise, set it NULL. */ +@@ -2001,7 +2011,7 @@ for (;;) + md->start_match_ptr = mstart; + RRETURN(MATCH_MATCH); /* Sets md->mark */ + } +- ++ + /* For capturing groups we have to check the group number back at the start + and if necessary complete handling an extraction by setting the offsets and + bumping the high water mark. Whole-pattern recursion is coded as a recurse +@@ -2061,6 +2071,18 @@ for (;;) + } + } + ++ /* OP_KETRPOS is a possessive repeating ket. Remember the current position, ++ and return the MATCH_KETRPOS. This makes it possible to do the repeats one ++ at a time from the outer level, thus saving stack. This must precede the ++ empty string test - in this case that test is done at the outer level. */ ++ ++ if (*ecode == OP_KETRPOS) ++ { ++ md->end_match_ptr = eptr; ++ md->end_offset_top = offset_top; ++ RRETURN(MATCH_KETRPOS); ++ } ++ + /* For an ordinary non-repeating ket, just continue at this level. This + also happens for a repeating ket if no characters were matched in the + group. This is the forcible breaking of infinite loops as implemented in +@@ -2083,17 +2105,6 @@ for (;;) + break; + } + +- /* OP_KETRPOS is a possessive repeating ket. Remember the current position, +- and return the MATCH_KETRPOS. This makes it possible to do the repeats one +- at a time from the outer level, thus saving stack. */ +- +- if (*ecode == OP_KETRPOS) +- { +- md->end_match_ptr = eptr; +- md->end_offset_top = offset_top; +- RRETURN(MATCH_KETRPOS); +- } +- + /* The normal repeating kets try the rest of the pattern or restart from + the preceding bracket, in the appropriate order. In the second case, we can + use tail recursion to avoid using another stack frame, unless we have an +diff --git a/testdata/testinput1 b/testdata/testinput1 +index d77d8ac..6bde9ec 100644 +--- a/testdata/testinput1 ++++ b/testdata/testinput1 +@@ -5614,4 +5614,13 @@ AbcdCBefgBhiBqz + /[\Q]a\E]+/ + aa]] + ++'\A(?:[^\"]++|\"(?:[^\"]*+|\"\")*+\")++' ++ NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED ++ ++'\A(?:[^\"]++|\"(?:[^\"]++|\"\")*+\")++' ++ NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED ++ ++'\A(?:[^\"]++|\"(?:[^\"]++|\"\")++\")++' ++ NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED ++ + /-- End of testinput1 --/ +diff --git a/testdata/testinput8 b/testdata/testinput8 +index d91013b..98a0b38 100644 +--- a/testdata/testinput8 ++++ b/testdata/testinput8 +@@ -4801,4 +4801,10 @@ + /abcd/ + abcd\O0 + ++'\A(?:[^\"]++|\"(?:[^\"]*+|\"\")*+\")++' ++ NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED ++ ++'\A(?:[^\"]++|\"(?:[^\"]++|\"\")*+\")++' ++ NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED ++ + /-- End of testinput8 --/ +diff --git a/testdata/testoutput1 b/testdata/testoutput1 +index 1b0b8dc..cb9592d 100644 +--- a/testdata/testoutput1 ++++ b/testdata/testoutput1 +@@ -9208,4 +9208,16 @@ No match + aa]] + 0: aa]] + ++'\A(?:[^\"]++|\"(?:[^\"]*+|\"\")*+\")++' ++ NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED ++ 0: NON QUOTED "QUOT""ED" AFTER ++ ++'\A(?:[^\"]++|\"(?:[^\"]++|\"\")*+\")++' ++ NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED ++ 0: NON QUOTED "QUOT""ED" AFTER ++ ++'\A(?:[^\"]++|\"(?:[^\"]++|\"\")++\")++' ++ NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED ++ 0: NON QUOTED "QUOT""ED" AFTER ++ + /-- End of testinput1 --/ +diff --git a/testdata/testoutput8 b/testdata/testoutput8 +index 75affbe..666b67e 100644 +--- a/testdata/testoutput8 ++++ b/testdata/testoutput8 +@@ -8020,4 +8020,12 @@ Error -30 (invalid data in workspace for DFA restart) + abcd\O0 + Matched, but offsets vector is too small to show all matches + ++'\A(?:[^\"]++|\"(?:[^\"]*+|\"\")*+\")++' ++ NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED ++ 0: NON QUOTED "QUOT""ED" AFTER ++ ++'\A(?:[^\"]++|\"(?:[^\"]++|\"\")*+\")++' ++ NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED ++ 0: NON QUOTED "QUOT""ED" AFTER ++ + /-- End of testinput8 --/ +-- +1.9.3 + diff --git a/SOURCES/pcre-8.37-RC1-Fix-static-linking-issue-with-pkg-config.patch b/SOURCES/pcre-8.37-RC1-Fix-static-linking-issue-with-pkg-config.patch new file mode 100644 index 0000000..adf46ec --- /dev/null +++ b/SOURCES/pcre-8.37-RC1-Fix-static-linking-issue-with-pkg-config.patch @@ -0,0 +1,44 @@ +From 2765d0933715e6b2c78a4e74fa8d5cad27273f29 Mon Sep 17 00:00:00 2001 +From: ph10 +Date: Thu, 23 Apr 2015 17:34:33 +0000 +Subject: [PATCH] Fix static linking issue with pkg-config. +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@1552 2f5784b3-3f2a-0410-8824-cb99058d5e15 +Signed-off-by: Petr Písař + +diff --git a/libpcre.pc.in b/libpcre.pc.in +index 1f26b32..0a35da8 100644 +--- a/libpcre.pc.in ++++ b/libpcre.pc.in +@@ -9,4 +9,5 @@ Name: libpcre + Description: PCRE - Perl compatible regular expressions C library with 8 bit character support + Version: @PACKAGE_VERSION@ + Libs: -L${libdir} -lpcre ++Libs.private: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ + Cflags: -I${includedir} @PCRE_STATIC_CFLAG@ +diff --git a/libpcre16.pc.in b/libpcre16.pc.in +index f589b75..080c9dc 100644 +--- a/libpcre16.pc.in ++++ b/libpcre16.pc.in +@@ -9,4 +9,5 @@ Name: libpcre16 + Description: PCRE - Perl compatible regular expressions C library with 16 bit character support + Version: @PACKAGE_VERSION@ + Libs: -L${libdir} -lpcre16 ++Libs.private: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ + Cflags: -I${includedir} @PCRE_STATIC_CFLAG@ +diff --git a/libpcre32.pc.in b/libpcre32.pc.in +index 6582105..a3ae0e1 100644 +--- a/libpcre32.pc.in ++++ b/libpcre32.pc.in +@@ -9,4 +9,5 @@ Name: libpcre32 + Description: PCRE - Perl compatible regular expressions C library with 32 bit character support + Version: @PACKAGE_VERSION@ + Libs: -L${libdir} -lpcre32 ++Libs.private: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ + Cflags: -I${includedir} @PCRE_STATIC_CFLAG@ +-- +2.1.0 + diff --git a/SPECS/pcre.spec b/SPECS/pcre.spec index 7f5eb62..f0f59b4 100644 --- a/SPECS/pcre.spec +++ b/SPECS/pcre.spec @@ -2,7 +2,7 @@ #%%global rcversion RC1 Name: pcre Version: 8.32 -Release: %{?rcversion:0.}14%{?rcversion:.%rcversion}%{?dist} +Release: %{?rcversion:0.}15%{?rcversion:.%rcversion}%{?dist} %global myversion %{version}%{?rcversion:-%rcversion} Summary: Perl-compatible regular expression library Group: System Environment/Libraries @@ -29,6 +29,24 @@ Patch7: pcre-8.34-Fix-range-check-in-JIT-path.patch # Fix unused memory usage on zero-repeat assertion condition, bug #1169797, # CVE-2014-8964, in upstream after 8.36 Patch8: pcre-8.32-Fix-zero-repeat-assertion-condition-bug.patch +# Fix compiling expression where start-anchored character with more than one +# other case follows circumflex in multiline UTF mode, bug #1110621, +# in upstream 8.36 +Patch9: pcre-8.32-Fix-bad-starting-data-when-char-with-more-than-one-o.patch +# Fix character class with a literal quotation, bug #1111091, +# upstream bug #1494, in upstream after 8.35 +Patch10: pcre-8.32-Fix-bad-compile-of-Qx-.-where-x-is-any-character.patch +# Fix empty-matching possessive zero-repeat groups in interpreted mode, +# bug #1119320, upstream bug #1500, in upstream after 8.35 +Patch11: pcre-8.33-Fix-empty-matching-possessive-zero-repeat-groups-bug.patch +# Fix compiler crash for zero-repeated groups with a recursive back reference, +# bug #1119356, upstream bug #1503, in upstream after 8.35 +Patch12: pcre-8.32-Fix-compiler-crash-misbehaviour-for-zero-repeated-gr.patch +# Reset non-matched groups within capturing group up to forced match, +# bug #1161597, in upstream after 8.36 +Patch13: pcre-8.32-Fix-bug-when-there-are-unset-groups-prior-to-ACCEPT-.patch +# Fix static linking, bug #1217111, in upstream after 8.37-RC1 +Patch14: pcre-8.37-RC1-Fix-static-linking-issue-with-pkg-config.patch BuildRequires: readline-devel # New libtool to get rid of rpath BuildRequires: autoconf, automake, libtool @@ -77,6 +95,12 @@ Utilities demonstrating PCRE capabilities like pcregrep or pcretest. %patch6 -p1 -b .vector_size %patch7 -p1 -b .jitted_range_check %patch8 -p1 -b .zero_repeat_assertion +%patch9 -p1 -b .starting_data +%patch10 -p1 -b .class_with_literal +%patch11 -p1 -b .empty_zero_repeat_group +%patch12 -p1 -b .compiler_crash_zero_group +%patch13 -p1 -b .reset_groups +%patch14 -p1 -b .static_linking # Because of rpath patch libtoolize --copy --force && autoreconf -vif # One contributor's name is non-UTF-8 @@ -133,7 +157,7 @@ make check VERBOSE=yes %{_mandir}/man3/* %{_bindir}/pcre-config %doc doc/*.txt doc/html -%doc HACKING +%doc HACKING pcredemo.c %files static %{_libdir}/*.a @@ -146,6 +170,19 @@ make check VERBOSE=yes %{_mandir}/man1/pcretest.* %changelog +* Wed Apr 29 2015 Petr Pisar - 8.32-15 +- Fix compiling expression where start-anchored character with more than one + other case follows circumflex in multiline UTF mode (bug #1110621) +- Fix character class with a literal quotation (bug #1111091) +- Fix empty-matching possessive zero-repeat groups in interpreted mode + (bug #1119320) +- Fix compiler crash for zero-repeated groups with a recursive back reference + (bug #1119356) +- Reset non-matched groups within capturing group up to forced match + (bug #1161597) +- Fix static linking (bug #1217111) +- Package pcredemo.c as a documentation for pcre-devel (bug #1217118) + * Tue Dec 02 2014 Petr Pisar - 8.32-14 - Fix CVE-2014-8964 (unused memory usage on zero-repeat assertion condition) (bug #1169797)