Skip to content

Commit 94c6460

Browse files
committed
Merge branch 'PHP-7.1'
* PHP-7.1: Fix #70103: Fix bug 70103 when ZTS is enabled
2 parents cba3312 + cc75e8b commit 94c6460

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ext/zip/php_zip.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,18 +1699,18 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /*
16991699
zval_ptr_dtor(return_value);
17001700
RETURN_FALSE;
17011701
}
1702-
17031702
snprintf(entry_name_buf, MAXPATHLEN, "%s%s", add_path, file_stripped);
1704-
entry_name = entry_name_buf;
1705-
entry_name_len = strlen(entry_name);
17061703
} else {
1707-
entry_name = file_stripped;
1708-
entry_name_len = file_stripped_len;
1704+
snprintf(entry_name_buf, MAXPATHLEN, "%s", file_stripped);
17091705
}
1706+
1707+
entry_name = entry_name_buf;
1708+
entry_name_len = strlen(entry_name);
17101709
if (basename) {
17111710
zend_string_release(basename);
17121711
basename = NULL;
17131712
}
1713+
17141714
if (php_zip_add_file(intern, Z_STRVAL_P(zval_file), Z_STRLEN_P(zval_file),
17151715
entry_name, entry_name_len, 0, 0) < 0) {
17161716
zval_dtor(return_value);

0 commit comments

Comments
 (0)