From: Xinchen Hui Date: Tue, 9 Feb 2016 15:32:20 +0000 (+0800) Subject: Fixed bug #71561 (NULL pointer dereference in Zip::ExtractTo) X-Git-Tag: php-7.0.4RC1~20^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f45752eb8393ebe758d8e920f7a48a2a39aa6ea5;p=php Fixed bug #71561 (NULL pointer dereference in Zip::ExtractTo) --- diff --git a/NEWS b/NEWS index 0fc0565798..a13c4b2d54 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,9 @@ PHP NEWS - Standard: . Fixed bug #70720 (strip_tags improper php code parsing). (Julien) +- Zip: + . Fixed bug #71561 (NULL pointer dereference in Zip::ExtractTo). (Laruence) + 04 Feb 2016, PHP 5.6.18 - Core: 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; } }