summaryrefslogtreecommitdiff
path: root/ext/phar/func_interceptors.c
diff options
context:
space:
mode:
authorSteph Fox <sfox@php.net>2008-08-01 13:48:45 +0000
committerSteph Fox <sfox@php.net>2008-08-01 13:48:45 +0000
commit4e5280a7a2d0b097d217511041d46257c28a8e63 (patch)
tree24bd195978d786b294e41338622109486f714817 /ext/phar/func_interceptors.c
parent821bab83a3f68a31ad15e06d92720018032f8b7e (diff)
downloadphp-git-4e5280a7a2d0b097d217511041d46257c28a8e63.tar.gz
- ws/cs, macros, code that only affects other branches
- some unsynced changes need valgrind testing before they can go into this branch, see PECL/HEAD
Diffstat (limited to 'ext/phar/func_interceptors.c')
-rw-r--r--ext/phar/func_interceptors.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c
index 266bbb0d8a..d3308b571a 100644
--- a/ext/phar/func_interceptors.c
+++ b/ext/phar/func_interceptors.c
@@ -37,6 +37,7 @@ PHAR_FUNC(phar_opendir) /* {{{ */
&& !cached_phars.arBuckets) {
goto skip_phar;
}
+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|z", &filename, &filename_len, &zcontext) == FAILURE) {
return;
}
@@ -110,10 +111,12 @@ PHAR_FUNC(phar_file_get_contents) /* {{{ */
&& !cached_phars.arBuckets) {
goto skip_phar;
}
+
/* Parse arguments */
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s|br!ll", &filename, &filename_len, &use_include_path, &zcontext, &offset, &maxlen) == FAILURE) {
goto skip_phar;
}
+
if (use_include_path || (!IS_ABSOLUTE_PATH(filename, filename_len) && !strstr(filename, "://"))) {
char *arch, *entry, *fname;
int arch_len, entry_len, fname_len;
@@ -783,7 +786,7 @@ statme_baby:
if (!phar->is_writeable) {
sb.st_mode = (sb.st_mode & 0555) | (sb.st_mode & ~0777);
}
-
+
sb.st_nlink = 1;
sb.st_rdev = -1;
/* this is only for APC, so use /dev/null device - no chance of conflict there! */