#27216 [NEW]: parsing crashes on texts longer than 3799 chars
| From: | list at fredfred dot net | Date: | Wed, 11 Feb 2004 02:03:52 +0000 |
| Subject: | #27216 [NEW]: parsing crashes on texts longer than 3799 chars | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-54729@lists.php.net to get a copy of this message | ||
From: list at fredfred dot net
Operating system: Linux,Windows XP
PHP version: 4.3.4
PHP Bug Type: *Regular Expressions
Bug description: parsing crashes on texts longer than 3799 chars
Description:
------------
When I try use preg_match_all( $regexp, $a, $vysl);
it crashes when $a contains text in format like in file here:
http://www.contipromotor.cz/download/phpBug3800chars.htm.
Basically it contains 'abbba(3799 times char s or \r\n)xa'
Just delete the last 'x' and it works fine.
Reproduce code:
---------------
$a = I read content of file
http://www.contipromotor.cz/download/phpBug3800chars.htm
$regexp = "/a(.*)a((?:.|\n)*?)a/i";
if(preg_match_all( $regexp, $a, $vysl))
echo "found";
else
echo "not found";
Expected result:
----------------
"found" or "not found"
Actual result:
--------------
CGI Error
The specified CGI application misbehaved by not returning a complete set
of HTTP headers. The headers it did return are:
--
Edit bug report at http://bugs.php.net/?id=27216&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27216&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27216&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=27216&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=27216&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27216&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=27216&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=27216&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=27216&r=support
Expected behavior: http://bugs.php.net/fix.php?id=27216&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=27216&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=27216&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=27216&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27216&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=27216&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=27216&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=27216&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27216&r=float