From f45752eb8393ebe758d8e920f7a48a2a39aa6ea5 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Tue, 9 Feb 2016 23:32:20 +0800 Subject: Fixed bug #71561 (NULL pointer dereference in Zip::ExtractTo) --- ext/zip/php_zip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/zip/php_zip.c') diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index d040d206d1..ccd0467fd3 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -2713,7 +2713,7 @@ static ZIPARCHIVE_METHOD(extractTo) for (i = 0; i < filecount; i++) { char *file = (char*)zip_get_name(intern, i, ZIP_FL_UNCHANGED); - if (!php_zip_extract_file(intern, pathto, file, strlen(file) TSRMLS_CC)) { + if (!file || !php_zip_extract_file(intern, pathto, file, strlen(file) TSRMLS_CC)) { RETURN_FALSE; } } -- cgit v1.2.1 From c9357f82d3882eb3c7cb9f63dbc98d354fb20739 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 14 Feb 2016 14:02:19 +0100 Subject: Format string fixes Conflicts: ext/pgsql/pgsql.c --- ext/zip/php_zip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/zip/php_zip.c') diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index ff3e60e4a9..83c14b5836 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -331,7 +331,7 @@ static int php_zip_parse_options(zval *options, zend_long *remove_all_path, char } if (Z_STRLEN_P(option) >= MAXPATHLEN) { - php_error_docref(NULL, E_WARNING, "remove_path string is too long (max: %i, %i given)", + php_error_docref(NULL, E_WARNING, "remove_path string is too long (max: %d, %zd given)", MAXPATHLEN - 1, Z_STRLEN_P(option)); return -1; } @@ -351,7 +351,7 @@ static int php_zip_parse_options(zval *options, zend_long *remove_all_path, char } if (Z_STRLEN_P(option) >= MAXPATHLEN) { - php_error_docref(NULL, E_WARNING, "add_path string too long (max: %i, %i given)", + php_error_docref(NULL, E_WARNING, "add_path string too long (max: %d, %zd given)", MAXPATHLEN - 1, Z_STRLEN_P(option)); return -1; } -- cgit v1.2.1 From 9afb29aa68351aa96f8edca51900f04513e291c7 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Wed, 17 Feb 2016 22:44:05 -0800 Subject: Remove TSRMLS_* from code, they are not used anymore --- ext/zip/php_zip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/zip/php_zip.c') diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 83c14b5836..6bb23ad85d 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -1506,7 +1506,7 @@ static ZIPARCHIVE_METHOD(close) ze_obj = Z_ZIP_P(self); if ((err = zip_close(intern))) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", zip_strerror(intern)); + php_error_docref(NULL, E_WARNING, "%s", zip_strerror(intern)); zip_discard(intern); } -- cgit v1.2.1 From d20f1d8f1f6a238cb290f5ccab2de1ac3dcaa03a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 22 Feb 2016 09:26:00 +0100 Subject: cleanup $Id --- ext/zip/php_zip.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'ext/zip/php_zip.c') diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index ccd0467fd3..1791548e0e 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -16,7 +16,6 @@ +----------------------------------------------------------------------+ */ -/* $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -3162,7 +3161,6 @@ static PHP_MINFO_FUNCTION(zip) php_info_print_table_start(); php_info_print_table_row(2, "Zip", "enabled"); - php_info_print_table_row(2, "Extension Version","$Id$"); php_info_print_table_row(2, "Zip version", PHP_ZIP_VERSION); php_info_print_table_row(2, "Libzip version", LIBZIP_VERSION); -- cgit v1.2.1