Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ext/zip/php_zip.c
Original file line number Diff line number Diff line change
Expand Up @@ -636,14 +636,14 @@ int php_zip_glob(char *pattern, int pattern_len, zend_long flags, zval *return_v

/* now catch the FreeBSD style of "no matches" */
if (!globbuf.gl_pathc || !globbuf.gl_pathv) {
globfree(&globbuf);
php_globfree(&globbuf);
return 0;
}

/* we assume that any glob pattern will match files from one directory only
so checking the dirname of the first match should be sufficient */
if (ZIP_OPENBASEDIR_CHECKPATH(globbuf.gl_pathv[0])) {
globfree(&globbuf);
php_globfree(&globbuf);
return -1;
}

Expand Down
Loading