Bug #52990 [Opn->Dup]: PHP crash when PCRE exceed recursion limit.
| From: | aharvey@php.net | Date: | Thu, 07 Oct 2010 02:10:37 +0000 |
| Subject: | Bug #52990 [Opn->Dup]: PHP crash when PCRE exceed recursion limit. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-154969@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52990&edit=1
ID: 52990
Updated by: aharvey@php.net
Reported by: sarun37823 at bigfoot dot com
Summary: PHP crash when PCRE exceed recursion limit.
-Status: Open
+Status: Duplicate
Type: Bug
Package: PCRE related
Operating System: *nix
PHP Version: 5.2.14
Block user comment: N
New Comment:
Duplicate of an absolute tonne of bugs; most recently bug #52818.
Previous Comments:
------------------------------------------------------------------------
[2010-10-05 07:44:45] sarun37823 at bigfoot dot com
Description:
------------
Hello, I've got "Zero Sized Reply" when I try to replace a long string
with PCRE.
Test script:
---------------
<?php
$strtest='';
for($i=0; $i<1024; $i++)$strtest.=chr(rand(1, 254));
$strtest.='B';
for($i=0; $i<1024*512; $i++)$strtest.=chr(rand(1, 254));
$strtest.='signature';
for($i=0; $i<1024; $i++)$strtest.=chr(rand(1, 254));
preg_replace('/b(?:.(?!signature))*.(sig.+)/sim', 'null${1}',
$strtest);
?>
Expected result:
----------------
blank page
Actual result:
--------------
ERROR
The requested URL could not be retrieved
While trying to retrieve the URL: *******
The following error was encountered:
Zero Sized Reply
Squid did not receive any data for this request.
Your cache administrator is *******.
Generated Tue, 05 Oct 2010 05:28:19 GMT by ******* (squid/2.7.STABLE3)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52990&edit=1