summaryrefslogtreecommitdiff
path: root/ext/zip/php_zip.c
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2017-01-06 15:39:33 +0100
committerChristoph M. Becker <cmbecker69@gmx.de>2017-01-06 15:44:31 +0100
commitcc75e8bca5bf4cfb000620156b7e6cf38a22bdeb (patch)
tree2700351337fe38a8745a87762829847d358b70c1 /ext/zip/php_zip.c
parentec0daf7913c69ab7fb307bd42628a9c9f46c1871 (diff)
parentad08aa39561eb6aa3d03b2be06ed3894dbb2892c (diff)
downloadphp-git-cc75e8bca5bf4cfb000620156b7e6cf38a22bdeb.tar.gz
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: Fix #70103: Fix bug 70103 when ZTS is enabled
Diffstat (limited to 'ext/zip/php_zip.c')
-rw-r--r--ext/zip/php_zip.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c
index 5fcd3afc63..bfa473f002 100644
--- a/ext/zip/php_zip.c
+++ b/ext/zip/php_zip.c
@@ -1699,18 +1699,18 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /*
zval_ptr_dtor(return_value);
RETURN_FALSE;
}
-
snprintf(entry_name_buf, MAXPATHLEN, "%s%s", add_path, file_stripped);
- entry_name = entry_name_buf;
- entry_name_len = strlen(entry_name);
} else {
- entry_name = file_stripped;
- entry_name_len = file_stripped_len;
+ snprintf(entry_name_buf, MAXPATHLEN, "%s", file_stripped);
}
+
+ entry_name = entry_name_buf;
+ entry_name_len = strlen(entry_name);
if (basename) {
zend_string_release(basename);
basename = NULL;
}
+
if (php_zip_add_file(intern, Z_STRVAL_P(zval_file), Z_STRLEN_P(zval_file),
entry_name, entry_name_len, 0, 0) < 0) {
zval_dtor(return_value);