cellog Tue Sep 30 02:40:17 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/phar phar.c Log: fix Bug #46194: SIGSEGV when requested file is not found http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.c?r1=1.370.2.47&r2=1.370.2.48&diff_format=u Index: php-src/ext/phar/phar.c diff -u php-src/ext/phar/phar.c:1.370.2.47 php-src/ext/phar/phar.c:1.370.2.48 --- php-src/ext/phar/phar.c:1.370.2.47 Fri Sep 26 23:34:56 2008 +++ php-src/ext/phar/phar.c Tue Sep 30 02:40:17 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: phar.c,v 1.370.2.47 2008/09/26 23:34:56 cellog Exp $ */ +/* $Id: phar.c,v 1.370.2.48 2008/09/30 02:40:17 cellog Exp $ */ #define PHAR_MAIN 1 #include "phar_internal.h" @@ -3291,6 +3291,9 @@ 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) { @@ -3617,7 +3620,7 @@ php_info_print_table_header(2, "Phar: PHP Archive support", "enabled"); php_info_print_table_row(2, "Phar EXT version", PHP_PHAR_VERSION); php_info_print_table_row(2, "Phar API version", PHP_PHAR_API_VERSION); - php_info_print_table_row(2, "CVS revision", "$Revision: 1.370.2.47 $"); + php_info_print_table_row(2, "CVS revision", "$Revision: 1.370.2.48 $"); php_info_print_table_row(2, "Phar-based phar archives", "enabled"); php_info_print_table_row(2, "Tar-based phar archives", "enabled"); php_info_print_table_row(2, "ZIP-based phar archives", "enabled");
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php