Bug 769597

Summary: Unmatched subpattern becomes wildcard
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: pcreAssignee: Petr Pisar <ppisar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: c.david86, lkundrak, ppisar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://lists.exim.org/lurker/message/20111221.071039.d3f28a91.en.html
Whiteboard:
Fixed In Version: pcre-8.12-6.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-07 22:54:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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 
data> 

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.
https://admin.fedoraproject.org/updates/pcre-8.12-7.fc16

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.
https://admin.fedoraproject.org/updates/pcre-8.12-6.fc15

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:
https://admin.fedoraproject.org/updates/FEDORA-2012-0023/pcre-8.12-7.fc16
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.