Re: [PATCH] include_once/require_once core dump
| From: | Brian J. France | Date: | Tue, 20 May 2003 00:55:27 +0000 |
| Subject: | Re: [PATCH] include_once/require_once core dump | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-1748@lists.php.net to get a copy of this message | ||
<?PHP
include_once( "foo.php" );
?>
Since foo.php doesn't exists, zend_open will fail and then try to send a
warning message using file_handle.filename. Since zend_open failed
file_handle.filename will still be in its initial state of "file_handle =
{0}". zend_message_dispatcher is called with file_handle.filename, which
calls php_message_handler_for_zend, which calls php_strip_url_passwd, which
core dumps because *file_handle.filename is a bad address.
Brian
On Tue, 20 May 2003 03:46:14 +0300 (EEST), Jani Taskinen wrote:
>
> Any example code?
>
> --Jani
>
>
> On Mon, 19 May 2003, Brian J. France wrote:
>
>> Can somebody with karma check in the following patch?
>>
>> If zend_open fails for require_once or include_oncde, file_handle is
>> not defined and can't be used for the error/warning message.
>> Changed to inc_filename->value.str.val which is what is passed to zend_open.
>>
>> Thanks,
>>
>> Brian
>>
>>
>
> --
> <- For Sale! ->
>
>