summaryrefslogtreecommitdiff
path: root/ext/phar
diff options
context:
space:
mode:
authorGreg Beaver <cellog@php.net>2008-09-26 23:34:57 +0000
committerGreg Beaver <cellog@php.net>2008-09-26 23:34:57 +0000
commite1d0a964dafa619b7aa6a78de6fd37957b1e9275 (patch)
tree5c19c39ef2ad33bdc7b57807150ea334d581508e /ext/phar
parentc6f452fb5332f332af94ccb50e952cbb34da9a74 (diff)
downloadphp-git-e1d0a964dafa619b7aa6a78de6fd37957b1e9275.tar.gz
fix 017.phpt in streams.c, and very dangerous intercepting of file functions in all cases introduced in multi-threaded fix
Diffstat (limited to 'ext/phar')
-rw-r--r--ext/phar/phar.c1
-rw-r--r--ext/phar/stream.c9
2 files changed, 1 insertions, 9 deletions
diff --git a/ext/phar/phar.c b/ext/phar/phar.c
index 4c351751f9..0065367bb9 100644
--- a/ext/phar/phar.c
+++ b/ext/phar/phar.c
@@ -3561,7 +3561,6 @@ void phar_request_initialize(TSRMLS_D) /* {{{ */
PHAR_G(cwd) = NULL;
PHAR_G(cwd_len) = 0;
PHAR_G(cwd_init) = 0;
- phar_intercept_functions(TSRMLS_C);
}
}
/* }}} */
diff --git a/ext/phar/stream.c b/ext/phar/stream.c
index 3a50962398..665fae97d8 100644
--- a/ext/phar/stream.c
+++ b/ext/phar/stream.c
@@ -258,7 +258,7 @@ static php_stream * phar_wrapper_open_url(php_stream_wrapper *wrapper, char *pat
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 @@ phar_stub:
*/
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;
}
/* }}} */