Re: [PHP4BETA] explode(), strpos() not binary safe!

From: Date: Tue, 23 Nov 1999 13:55:52 +0000
Subject: Re: [PHP4BETA] explode(), strpos() not binary safe!
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-6744@lists.php.net to get a copy of this message
On Tue, 23 Nov 1999, Sascha Schumann wrote: > On Tue, Nov 23, 1999 at 02:46:15PM +0100, Thies C. Arntzen wrote: > > On Tue, 23 Nov 1999, Sascha Schumann wrote: > > > > > On Tue, Nov 23, 1999 at 01:50:02PM +0100, Thies C. Arntzen wrote: > > > > hi, > > > > i think it's time to make the rest of php4 binary safe. > > > > > > > > i think we should borrow the libc routines (strstr etc) from OpenBSD (like > > > > we did with strlcat & strlcpy) and include our own binary-safe version > > > > with a different (mem_str, mem_chr) name in php4 > > > > > > We already have binary-safe equivalents of many string > > > functions. Which do you refer to? > > > > explode(), strpos() as an example. > > Ok, we already have replacements for the libc functions used > there. Do we need to import anything else? > > explode: strstr => php_memnstr > strpos: strpos => memchr i got bitten by those two just an hour ago - i'm sure there's some more. a good test for this kind of things it to link without libc and see what's missing. tc > > -- > > Regards, > > Sascha Schumann > Consultant > > Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!" Digital Collections Phone +49 40 235350 Fax +49 40 23535180 Hammerbrookstr. 93 20097 Hamburg / Germany

« previous php.version4 (#6744) next »