Re: PHP 4.0 Bug #4831: str_replace under certain conditions will crash Roxen webserver 2.0.x

From: Date: Fri, 03 Nov 2000 00:04:53 +0000
Subject: Re: PHP 4.0 Bug #4831: str_replace under certain conditions will crash Roxen webserver 2.0.x
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-36877@lists.php.net to get a copy of this message
emils@dot.lv writes: > From: emils@dot.lv > Operating system: SuSE Linux 6.2 > PHP version: 4.0.0 Release > PHP Bug Type: Reproduceable crash > Bug description: str_replace under certain conditions will crash Roxen webserver 2.0.x > > PHP4.0.0 compiled with: > ./configure --with-roxen=/usr/local/roxen/server --without-mysql --without-msql > --with-pgsql=/usr/local/pgsql --enable-roxen-zts > > The following line causes Roxen webserver to crash, if the variables used are empty: > <? > > $search_text=$search_text.'&s_title='.str_replace(' > ','%20',$s_title).'&s_text='.str_replace(' > ','%20',$s_text); > > ?> > > The above happens for the Roxen 2.0.46/2.0.50 . It will make the garbagecollector process do a > coredump. Ancient bug, but I found the reason (for this one and countless others) - another name-space conflict. 'empty_string' is defined in Pike in one place (it could be made static). That empty string is not a char * but something completely different (which generally is undefined). Anyway, in the one place in Pike where it's defined it can be made static (and it fixes the problem). Not sure if any action on the PHP4 side would be desirable. Probably not though. I'll make sure that Pike is patched. -- [ Below is a random fortune, which is unrelated to the above message. ] <<<<< EVACUATION ROUTE <<<<<

« previous php.dev (#36877) next »