diff options
| author | Felipe Pena <felipe@php.net> | 2011-06-06 21:28:16 +0000 |
|---|---|---|
| committer | Felipe Pena <felipe@php.net> | 2011-06-06 21:28:16 +0000 |
| commit | 4737910b69eba83b5ba6dd2d43f88a7bd3461ccf (patch) | |
| tree | dc6ecafe9a79a17cbb6d4a96b83a1bcbda30e5a8 /ext/phar | |
| parent | 6b85eb58b27a60cfc4d78ad0a85afeda373132c5 (diff) | |
| download | php-git-4737910b69eba83b5ba6dd2d43f88a7bd3461ccf.tar.gz | |
- Added new parameter parsing option (p - for valid path (string without null byte in the middle))
# The tests will be fixed in the next commits
Diffstat (limited to 'ext/phar')
| -rw-r--r-- | ext/phar/func_interceptors.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c index 353bc47072..1b3f0f461b 100644 --- a/ext/phar/func_interceptors.c +++ b/ext/phar/func_interceptors.c @@ -38,7 +38,7 @@ PHAR_FUNC(phar_opendir) /* {{{ */ goto skip_phar; } - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|z", &filename, &filename_len, &zcontext) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|z", &filename, &filename_len, &zcontext) == FAILURE) { return; } @@ -113,7 +113,7 @@ PHAR_FUNC(phar_file_get_contents) /* {{{ */ } /* 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) { + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "p|br!ll", &filename, &filename_len, &use_include_path, &zcontext, &offset, &maxlen) == FAILURE) { goto skip_phar; } @@ -244,7 +244,7 @@ PHAR_FUNC(phar_readfile) /* {{{ */ && !cached_phars.arBuckets) { goto skip_phar; } - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s|br!", &filename, &filename_len, &use_include_path, &zcontext) == FAILURE) { + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "p|br!", &filename, &filename_len, &use_include_path, &zcontext) == FAILURE) { goto skip_phar; } if (use_include_path || (!IS_ABSOLUTE_PATH(filename, filename_len) && !strstr(filename, "://"))) { @@ -340,7 +340,7 @@ PHAR_FUNC(phar_fopen) /* {{{ */ /* no need to check, include_path not even specified in fopen/ no active phars */ goto skip_phar; } - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "ss|br", &filename, &filename_len, &mode, &mode_len, &use_include_path, &zcontext) == FAILURE) { + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "ps|br", &filename, &filename_len, &mode, &mode_len, &use_include_path, &zcontext) == FAILURE) { goto skip_phar; } if (use_include_path || (!IS_ABSOLUTE_PATH(filename, filename_len) && !strstr(filename, "://"))) { @@ -813,7 +813,7 @@ void fname(INTERNAL_FUNCTION_PARAMETERS) { \ char *filename; \ int filename_len; \ \ - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) { \ + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &filename, &filename_len) == FAILURE) { \ return; \ } \ \ @@ -905,7 +905,7 @@ PHAR_FUNC(phar_is_file) /* {{{ */ && !cached_phars.arBuckets) { goto skip_phar; } - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) { + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "p", &filename, &filename_len) == FAILURE) { goto skip_phar; } if (!IS_ABSOLUTE_PATH(filename, filename_len) && !strstr(filename, "://")) { @@ -972,7 +972,7 @@ PHAR_FUNC(phar_is_link) /* {{{ */ && !cached_phars.arBuckets) { goto skip_phar; } - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) { + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "p", &filename, &filename_len) == FAILURE) { goto skip_phar; } if (!IS_ABSOLUTE_PATH(filename, filename_len) && !strstr(filename, "://")) { |
