Bug 769597 - Unmatched subpattern becomes wildcard
Summary: Unmatched subpattern becomes wildcard
Alias: None
Product: Fedora
Classification: Fedora
Component: pcre
Version: 15
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Petr Pisar
QA Contact: Fedora Extras Quality Assurance
URL: https://lists.exim.org/lurker/message...
Depends On:
TreeView+ depends on / blocked
Reported: 2011-12-21 12:40 UTC by Petr Pisar
Modified: 2012-01-17 20:30 UTC (History)
3 users (show)

Fixed In Version: pcre-8.12-6.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2012-01-07 22:54:58 UTC

Attachments (Terms of Use)

Description Petr Pisar 2011-12-21 12:40:36 UTC
Reported from upstream (https://lists.exim.org/lurker/message/20111221.071039.d3f28a91.en.html):

$ pcretest 
PCRE version 8.12 2011-01-15

  re> /(another)?(\1?)test/
data> hello world test
 0: hello world test
 1: <unset>
 2: hello world 

This is wrong result. Correct one (only one match for "test") provides pcre-8.10. All Fedoras are affected. Unaffected is JIT variants (pcretest -s+).

Comment 1 Petr Pisar 2012-01-02 09:47:21 UTC
Fix in upstream in huge merge:

r836 | ph10 | 2011-12-28 18:16:11 +0100 (St, 28 pro 2011) | 2 lines
Merging all the changes from the pcre16 branch into the trunk.

by putting `if (length < 0 && min == 0) continue;' after

--- pcre_exec.c (revision 813)
+++ pcre_exec.c (working copy)
@@ -2634,6 +2634,8 @@

if (length == 0) continue;

Comment 2 Petr Pisar 2012-01-02 12:03:26 UTC
Fixed as pcre-8.21-2.fc17 in F17.

Comment 3 Fedora Update System 2012-01-02 12:26:06 UTC
pcre-8.12-7.fc16 has been submitted as an update for Fedora 16.

Comment 4 Fedora Update System 2012-01-02 12:29:43 UTC
pcre-8.12-6.fc15 has been submitted as an update for Fedora 15.

Comment 5 Fedora Update System 2012-01-02 21:52:45 UTC
Package pcre-8.12-7.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing pcre-8.12-7.fc16'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2012-01-07 22:54:58 UTC
pcre-8.12-7.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2012-01-17 20:30:28 UTC
pcre-8.12-6.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.