Re: null character - file related function

From: Date: Mon, 06 Oct 2003 16:47:15 +0000
Subject: Re: null character - file related function
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-165203@lists.php.net to get a copy of this message
* Thus wrote Martin Straka (straka@fido.cz): > Hi, > > On Mon, 6 Oct 2003, Mark Charette wrote: > > > > Strings in PHP are binary safe and thus do not rely on null temrination. > > > > You are, of course, right (just a brainfart on my part ...). > > > > There are a number of functions that depend on null termination of > > strings; handing a string with embedded nulls in it to those functions may > > result in "interesting" things happening .... > > And is somewhere written which functions depend on null termination? Well, the source code for escapeshellcmd has: /* {{{ php_escape_shell_cmd Escape all chars that could possibly be used to ... *NOT* safe for binary strings */ Some functions are documented as binary safe, i'm not entirely sure what php's policy is on noting if a function is binary safe or not. Curt -- List Stats: http://zirzow.dyndns.org/html/mlists/php_general/ "I used to think I was indecisive, but now I'm not so sure."

« previous php.general (#165203) next »