Skip to content

Commit

Permalink
Merge branch 'PHP-7.1'
Browse files Browse the repository at this point in the history
* PHP-7.1:
  Fix #70103: Fix bug 70103 when ZTS is enabled
  • Loading branch information
cmb69 committed Jan 6, 2017
2 parents cba3312 + cc75e8b commit 94c6460
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ext/zip/php_zip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 94c6460

Please sign in to comment.