On 11/15/10 9:16 PM, Andi Gutmans wrote:
>> -----Original Message-----
>> From: Stas Malyshev [mailto:smalys...@sugarcrm.com]
>> Sent: Monday, November 15, 2010 8:21 PM
>> To: Rasmus Lerdorf
>> Cc: internals
>> Subject: Re: [PHP-DEV] Adding path_len to all stream functions in trunk
>>
>> Hi!
>>
>>> Ok, I went through all the 5.3 code.  This should fix the null
>>> poisoning problems in 5.3 without breaking binary compatibility:
>>>
>>> http://progphp.com/nullpatch.txt
>>
>> Looking at this patch, I wonder if it wouldn't be cleaner to add new type 
>> (string
>> without nulls) in parameter parsing and have it handled by parameter parsing
>> in one place instead of doing it in dozens of different places? There might 
>> be
>> some other places not covered but it would cover most functions - and it's
>> easier to catch/fix those in extensions.
> 
> That's a nice idea and it also wouldn't break binary compatibility.

Well, it changes the signature of that function, so while we don't break
backward binary compatibility, we break forward compatibility within the
5.3 branch.  As in, if I change my extension to use this new NoNull
string flag, it will no longer work on <5.3.3 whereas if I do the
if(strlen(filename) != filename_len) check, this will still work in all
5.3 releases.

-R

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to