diff options
author | SVN Migration <svn@php.net> | 2008-12-03 20:30:45 +0000 |
---|---|---|
committer | SVN Migration <svn@php.net> | 2008-12-03 20:30:45 +0000 |
commit | 2876046398950e59c3b3c460e67e6fec7ff2ba3c (patch) | |
tree | 33b2b8b4b859960a6446ad19d0ada1c55f9cfcda /main/streams/glob_wrapper.c | |
parent | 3fb86b0b9e79e6a3312b694f30ee627e2e1b325c (diff) | |
download | php-git-php-5.3.0alpha2.tar.gz |
This commit was manufactured by cvs2svn to create tag 'php_5_3_0alpha2'.php-5.3.0alpha2
Diffstat (limited to 'main/streams/glob_wrapper.c')
-rwxr-xr-x | main/streams/glob_wrapper.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/main/streams/glob_wrapper.c b/main/streams/glob_wrapper.c index 48974d841d..afc4e128e8 100755 --- a/main/streams/glob_wrapper.c +++ b/main/streams/glob_wrapper.c @@ -209,7 +209,7 @@ static php_stream *php_glob_stream_opener(php_stream_wrapper *wrapper, char *pat int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC) { glob_s_t *pglob; - int ret; + int ret, path_len; char *tmp, *pos; if (((options & STREAM_DISABLE_OPEN_BASEDIR) == 0) && php_check_open_basedir(path TSRMLS_CC)) { @@ -218,9 +218,12 @@ static php_stream *php_glob_stream_opener(php_stream_wrapper *wrapper, char *pat if (!strncmp(path, "glob://", sizeof("glob://")-1)) { path += sizeof("glob://")-1; + path_len = strlen(path); if (opened_path) { - *opened_path = estrdup(path); + *opened_path = estrndup(path, path_len); } + } else { + path_len = strlen(path); } pglob = ecalloc(sizeof(*pglob), 1); |