cellog Fri Sep 26 23:34:57 2008 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/phar phar.c stream.c
Log:
fix 017.phpt in streams.c, and very dangerous intercepting of file functions
in all cases introduced in multi-threaded fix
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.c?r1=1.370.2.46&r2=1.370.2.47&diff_format=u
Index: php-src/ext/phar/phar.c
diff -u php-src/ext/phar/phar.c:1.370.2.46 php-src/ext/phar/phar.c:1.370.2.47
--- php-src/ext/phar/phar.c:1.370.2.46 Fri Sep 26 16:29:43 2008
+++ php-src/ext/phar/phar.c Fri Sep 26 23:34:56 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: phar.c,v 1.370.2.46 2008/09/26 16:29:43 cellog Exp $ */
+/* $Id: phar.c,v 1.370.2.47 2008/09/26 23:34:56 cellog Exp $ */
#define PHAR_MAIN 1
#include "phar_internal.h"
@@ -3561,7 +3561,6 @@
PHAR_G(cwd) = NULL;
PHAR_G(cwd_len) = 0;
PHAR_G(cwd_init) = 0;
- phar_intercept_functions(TSRMLS_C);
}
}
/* }}} */
@@ -3618,7 +3617,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.46 $");
+ php_info_print_table_row(2, "CVS revision", "$Revision: 1.370.2.47 $");
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");
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/stream.c?r1=1.27.2.18&r2=1.27.2.19&diff_format=u
Index: php-src/ext/phar/stream.c
diff -u php-src/ext/phar/stream.c:1.27.2.18 php-src/ext/phar/stream.c:1.27.2.19
--- php-src/ext/phar/stream.c:1.27.2.18 Sat Sep 13 22:30:55 2008
+++ php-src/ext/phar/stream.c Fri Sep 26 23:34:57 2008
@@ -258,7 +258,7 @@
entry = (phar_entry_info *) ecalloc(1,
sizeof(phar_entry_info));
entry->is_temp_dir = 1;
- entry->filename = "";
+ entry->filename = estrndup("", 0);
entry->filename_len = 0;
entry->phar = phar;
entry->offset = entry->offset_abs = 0;
@@ -346,15 +346,8 @@
*/
static int phar_stream_close(php_stream *stream, int close_handle TSRMLS_DC)
/* {{{ */
{
- phar_entry_info *entry = ((phar_entry_data
*)stream->abstract)->internal_file;
- int is_temp_dir = entry->is_temp_dir;
-
phar_entry_delref((phar_entry_data *)stream->abstract TSRMLS_CC);
- if (is_temp_dir) {
- /* phar archive stub, free it */
- efree(entry);
- }
return 0;
}
/* }}} */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php