From:             
Operating system: *nix
PHP version:      5.2.14
Package:          PCRE related
Bug Type:         Bug
Bug description:PHP crash when PCRE exceed recursion limit.

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 bug report at http://bugs.php.net/bug.php?id=52990&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=52990&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=52990&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=52990&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=52990&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=52990&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=52990&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=52990&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=52990&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=52990&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=52990&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=52990&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=52990&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=52990&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=52990&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=52990&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=52990&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=52990&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=52990&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=52990&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=52990&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=52990&r=mysqlcfg

Reply via email to