From: Greg Beaver Date: Tue, 30 Sep 2008 02:40:37 +0000 (+0000) Subject: MFB: fix Bug #46194: SIGSEGV when requested file is not found X-Git-Tag: BEFORE_HEAD_NS_CHANGE~316 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d86427434a97896465bc50fc808a7de341913fc4;p=php MFB: fix Bug #46194: SIGSEGV when requested file is not found --- diff --git a/ext/phar/phar.c b/ext/phar/phar.c index 0065367bb9..7ae4af4f26 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -3291,6 +3291,9 @@ static zend_op_array *phar_compile_file(zend_file_handle *file_handle, int type int failed; phar_archive_data *phar; + if (!file_handle || !file_handle->filename) { + return phar_orig_compile_file(file_handle, type TSRMLS_CC); + } if (strstr(file_handle->filename, ".phar") && !strstr(file_handle->filename, "://")) { if (SUCCESS == phar_open_from_filename(file_handle->filename, strlen(file_handle->filename), NULL, 0, 0, &phar, NULL TSRMLS_CC)) { if (phar->is_zip || phar->is_tar) {