Crash with more that 127 named Subpattern
| Bug #47662 | Crash with more that 127 named Subpattern | ||||
|---|---|---|---|---|---|
| Submitted: | 2009-03-15 14:37 UTC | Modified: | 2009-04-10 15:48 UTC | ||
| From: | gmblar+php at gmail dot com | Assigned: | nlopess (profile) | ||
| Status: | Closed | Package: | PCRE related | ||
| PHP Version: | 5.2.9 | OS: | MacOSX 10.5 | ||
| Private report: | No | CVE-ID: | None | ||
[2009-03-15 14:37 UTC] gmblar+php at gmail dot com
Description:
------------
With more than 63 Subpattern in a Regular-Expression, PHP crashes with a
Segmention-Fault.
Reproduce code:
---------------
<?php
$regex = '@';
// works with $bar<63
for($bar=0; $bar<64; $bar++) {
$regex .= '((?P<foo'.$bar.'>))';
}
$regex .= '@';
preg_match($regex, 'foobar');
?>
Expected result:
----------------
Nothing
Actual result:
--------------
$ php foobar.php
Segmentation fault
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2009-03-26 15:02 UTC] mmcnicklebugs at googlemail dot com
[2009-04-06 23:17 UTC] gmblar+php at gmail dot com
[2009-04-06 23:19 UTC] gmblar+php at gmail dot com
[2009-04-10 15:31 UTC] nlopess@php.net
[2009-04-10 15:48 UTC] nlopess@php.net