Initialise zend_stat_t to fix MSAN build

This commit is contained in:
George Peter Banyard 2022-05-22 16:06:27 +01:00
parent cc506a81e1
commit 2ecd46f48f
No known key found for this signature in database
GPG key ID: 3306078E3194AEBD
17 changed files with 29 additions and 29 deletions

View file

@ -685,7 +685,7 @@ int php_zip_glob(char *pattern, int pattern_len, zend_long flags, zval *return_v
* able to filter directories out.
*/
if (flags & GLOB_ONLYDIR) {
zend_stat_t s;
zend_stat_t s = {0};
if (0 != VCWD_STAT(globbuf.gl_pathv[n], &s)) {
continue;
@ -757,7 +757,7 @@ int php_zip_pcre(zend_string *regexp, char *path, int path_len, zval *return_val
/* only the files, directories are ignored */
for (i = 0; i < files_cnt; i++) {
zend_stat_t s;
zend_stat_t s = {0};
char fullpath[MAXPATHLEN];
size_t namelist_len = ZSTR_LEN(namelist[i]);
@ -1482,7 +1482,7 @@ PHP_METHOD(ZipArchive, open)
#else
if ((flags & ZIP_TRUNCATE) == 0) {
#endif
zend_stat_t st;
zend_stat_t st = {0};
/* exists and is empty */
if (VCWD_STAT(resolved_path, &st) == 0 && st.st_size == 0) {