php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32312 Error in PCRE
Submitted: 2005-03-15 10:32 UTC Modified: 2005-05-09 02:28 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: xanthor at xanthor dot tk Assigned:
Status: Not a bug Package: PCRE related
PHP Version: 4CVS, 5CVS (2005-03-19) OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: xanthor at xanthor dot tk
New email:
PHP Version: OS:

 

 [2005-03-15 10:32 UTC] xanthor at xanthor dot tk
Description:
------------
The following code returns a wrong result with some strings, but when we reduce them, it swich back to expected behaviour.

Tested on PHP 4.3.10, 4.3.9, 5.0.2, and 5.0.3RC2
PCRE Library Version => 4.5 01-December-2003


Reproduce code:
---------------
preg_match("/((.*<.*>.*)*.(.*<.+>.+<.>.+)*b)?/",'<><'.str_repeat('a',14).'>'.str_repeat('a',33).'<a>'.str_repeat('a',92).'<a>'.str_repeat('a',8).'<a>a')

Expected result:
----------------
This code should return true

Actual result:
--------------
The code returns false.
Reduce one of the str_repeat, and it'll return true.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-16 21:31 UTC] xanthor at xanthor dot tk
It works with 4.3.2
 [2005-03-19 00:07 UTC] sniper@php.net
No, it doesn't return 'bool(true)' as preg_match() returns an integer. Try with something like 'var_dump(preg_match...' 
Also RTFM.

 [2005-04-20 09:04 UTC] sniper@php.net
It's the PCRElib limitation again..

 [2005-05-09 02:28 UTC] xanthor at xanthor dot tk
And were are submited PCRElib bugs ?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Oct 08 21:01:27 2024 UTC