Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #65069: GlobIterator fails to access files inside an open_basedir restricted dir #398

Closed
wants to merge 7 commits into from
Prev

Use braces for if statement

  • Loading branch information...
bukka committed Aug 14, 2013
commit 63f5bbed3c0f0f7aa439de6e91692ac3fed9ff6c
@@ -249,8 +249,9 @@ static php_stream *php_glob_stream_opener(php_stream_wrapper *wrapper, char *pat
if ((options & STREAM_DISABLE_OPEN_BASEDIR) == 0) {
for (i = 0; i < pglob->glob.gl_pathc; i++) {
if (!php_check_open_basedir_ex(pglob->glob.gl_pathv[i], 0 TSRMLS_CC)) {
if (!pglob->open_basedir_indexmap)
if (!pglob->open_basedir_indexmap) {
pglob->open_basedir_indexmap = (size_t *) emalloc(sizeof(size_t) * pglob->glob.gl_pathc);
}
pglob->open_basedir_indexmap[pglob->open_basedir_indexmap_size++] = i;
}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.