Re: PHP 5.2.1 crashing Apache/IIS...

From: Date: Sat, 10 Feb 2007 00:31:45 +0000
Subject: Re: PHP 5.2.1 crashing Apache/IIS...
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-27971@lists.php.net to get a copy of this message
This script crashes PHP 5.2.1 everywhere. Command-line and web server (module and CGI modes). IMO, there's a bug somewhere in str_ireplace(). But it could be also more fundamental with how Zend treats variables. All that showing data around assigning a variable to itself.
I can reproduce it. Seems to be off-by-one here: Z_STRVAL_P(result) = target = safe_emalloc(char_count, to_len, len); introduced by this patch: http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.36&r2=1.445.2.14.2.37 If I replace len with len+1, it seems to be OK. -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/

« previous php.internals (#27971) next »