Re: PHP 4.0 Bug #5014: Can read files that dont exist causing memory leak
| From: | Stanislav Malyshev | Date: | Wed, 14 Jun 2000 12:34:40 +0000 |
| Subject: | Re: PHP 4.0 Bug #5014: Can read files that dont exist causing memory leak | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-21311@lists.php.net to get a copy of this message | ||
>> (if you want a complete ps listing please request on email)
>> include("/this/file/does/not/exist/.../hopefully");
>>
>> $fp = fopen("$file","r");
Here V_FOPEN tries to open empty file. With VIRTUAL_DIR on, it means it
will try to open current directory. It will succeed, though not giving
what you want, probably.
>> while (!feof($fp)) {
I do not know what feof(directory) should give... Maybe it will never be
true.
>> $buffer = fread($fp,512);
This actually reads nothing, as far as I see.
So, the bottom line is that V_FOPEN probably should check on empty file
name.
--
Stanislav Malyshev stas@zend.com
+972-3-6139665