Re: stristr() overwrites haystack

From: Date: Thu, 06 Sep 2001 08:21:52 +0000
Subject: Re: stristr() overwrites haystack
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-65225@lists.php.net to get a copy of this message
On Thu, 6 Sep 2001, Rasmus Lerdorf wrote: > > Noop... fixed in cvs. > > Good catch Sebastian. We need to keep an eye on this Sterling guy! > Sometimes I wonder if he introduces bugs like this just to see if someone > will catch them. He introduced it about 2 days ago in this patch: > > > http://cvs.php.net/diff.php/php4/ext/standard/string.c?r1=1.229&r2=1.230&f=u > > And it didn't leak into the PHP_4_0_7 branch. > ;))) Hrmm, its very (*very*) tempting at times, but no... Just cleaning up, and a couple of ooOOooPPpp's come along, things which tests like: $str = stristr("BAHH HUMBUG", "H"); just don't pick up :) This is why I'm keeping this patch away from the PHP_4_0_7 branch, I figure any subtle stuff that will be introduced can be fixed by 4.0.8 (paying very close attention to php-dev@, and still testing for the bad stuff as it comes, don't worry :) -Sterling

« previous php.dev (#65225) next »