cellog Fri Sep 26 23:35:11 2008 UTC
Modified files:
/php-src/ext/phar phar.c stream.c
Log:
MFB: 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.385&r2=1.386&diff_format=u
Index: php-src/ext/phar/phar.c
diff -u php-src/ext/phar/phar.c:1.385 php-src/ext/phar/phar.c:1.386
--- php-src/ext/phar/phar.c:1.385 Fri Sep 26 16:30:10 2008
+++ php-src/ext/phar/phar.c Fri Sep 26 23:35:11 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: phar.c,v 1.385 2008/09/26 16:30:10 cellog Exp $ */
+/* $Id: phar.c,v 1.386 2008/09/26 23:35:11 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.385 $");
+ php_info_print_table_row(2, "CVS revision", "$Revision: 1.386 $");
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.35&r2=1.36&diff_format=u
Index: php-src/ext/phar/stream.c
diff -u php-src/ext/phar/stream.c:1.35 php-src/ext/phar/stream.c:1.36
--- php-src/ext/phar/stream.c:1.35 Sat Sep 13 22:31:18 2008
+++ php-src/ext/phar/stream.c Fri Sep 26 23:35:11 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