mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fix #79424 ext/zip: don't use gl_pathc after call to globfree
This breaks on Linux with the musl libc, since it zeroes out gl_pathc during globfree.
This commit is contained in:
parent
7f9b534e3a
commit
04920645f1
2 changed files with 4 additions and 1 deletions
|
@ -606,8 +606,9 @@ int php_zip_glob(char *pattern, int pattern_len, zend_long flags, zval *return_v
|
|||
add_next_index_string(return_value, globbuf.gl_pathv[n]+cwd_skip);
|
||||
}
|
||||
|
||||
ret = globbuf.gl_pathc;
|
||||
globfree(&globbuf);
|
||||
return globbuf.gl_pathc;
|
||||
return ret;
|
||||
#else
|
||||
zend_throw_error(NULL, "Glob support is not available");
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue