[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-cvs
Subject:    [PHP-CVS] cvs: php-src /ext/phar phar.c
From:       "Greg Beaver" <cellog () php ! net>
Date:       2008-09-30 2:40:38
Message-ID: cvscellog1222742438 () cvsserver
[Download RAW message or body]

cellog		Tue Sep 30 02:40:38 2008 UTC

  Modified files:              
    /php-src/ext/phar	phar.c 
  Log:
  MFB: fix Bug #46194: SIGSEGV when requested file is not found
  
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.c?r1=1.386&r2=1.387&diff_format=u
Index: php-src/ext/phar/phar.c
diff -u php-src/ext/phar/phar.c:1.386 php-src/ext/phar/phar.c:1.387
--- php-src/ext/phar/phar.c:1.386	Fri Sep 26 23:35:11 2008
+++ php-src/ext/phar/phar.c	Tue Sep 30 02:40:37 2008
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: phar.c,v 1.386 2008/09/26 23:35:11 cellog Exp $ */
+/* $Id: phar.c,v 1.387 2008/09/30 02:40:37 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.386 $");
+	php_info_print_table_row(2, "CVS revision", "$Revision: 1.387 $");
 	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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic