Re: Adding path_len to all stream functions in trunk
| From: | Johannes Schlüter | Date: | Thu, 18 Nov 2010 09:59:24 +0000 |
| Subject: | Re: Adding path_len to all stream functions in trunk | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-50327@lists.php.net to get a copy of this message | ||
On Tue, 2010-11-16 at 10:29 +0100, Johannes Schlüter wrote:
> On Mon, 2010-11-15 at 02:42 -0800, Rasmus Lerdorf wrote:
> > 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
>
> I didn't check it as I'm on vacation traveling right now, but: Does the
> data: wrapper allow \0 in the data? Something like
> fopen("data:text/plain,foo\0bar" "r");
Answering to myself:
php -r 'var_dump(file_get_contents("data:text/plain,foo\0bar"));'
string(3) "foo"
The data: wrapper looses the stuff already. So I see no harm by the
patch. It might even produce an error in this situation which is a good
thing (while everybody should use base64 with data: anyways ...)
johannes