Merge branch 'PHP-7.4'

* PHP-7.4:
  NEWS
  Fix #79424 ext/zip: don't use gl_pathc after call to globfree
This commit is contained in:
Remi Collet 2020-03-29 14:24:12 +02:00
commit 5fa17fbf94

View file

@ -688,8 +688,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); add_next_index_string(return_value, globbuf.gl_pathv[n]+cwd_skip);
} }
ret = globbuf.gl_pathc;
globfree(&globbuf); globfree(&globbuf);
return globbuf.gl_pathc; return ret;
#else #else
zend_throw_error(NULL, "Glob support is not available"); zend_throw_error(NULL, "Glob support is not available");
return 0; return 0;