Skip to content
Open
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 @@ -709,7 +709,7 @@ int php_zip_glob(zend_string *spattern, zend_long flags, zval *return_value) /*
return -1;
}

array_init(return_value);
array_init_size(return_value, (uint32_t)globbuf.gl_pathc);
for (size_t n = 0; n < globbuf.gl_pathc; n++) {
/* we need to do this every time since PHP_GLOB_ONLYDIR does not guarantee that
* all directories will be filtered. GNU libc documentation states the
Expand Down Expand Up @@ -788,7 +788,7 @@ int php_zip_pcre(zend_string *regexp, char *path, int path_len, zval *return_val
return -1;
}

array_init(return_value);
array_init_size(return_value, (uint32_t)files_cnt);

/* only the files, directories are ignored */
for (i = 0; i < files_cnt; i++) {
Expand Down
Loading