diff options
author | Remi Collet <remi@php.net> | 2017-11-20 09:42:47 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2017-11-20 09:42:47 +0100 |
commit | d773a92f3c49c3f17079153d7bd9b44462266996 (patch) | |
tree | f800b2e7d114cf297166b952860a68096c1ccba2 /ext/zip | |
parent | 50a867eb07c1fa82e113837422d55c2341b53719 (diff) | |
parent | 702ef2736479af85ce17aec83c6cfc1fecccf326 (diff) | |
download | php-git-d773a92f3c49c3f17079153d7bd9b44462266996.tar.gz |
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
Better fix bug #75540 Segfault with libzip 1.3.1 - only 1.3.1 is affected - fix use after free
Diffstat (limited to 'ext/zip')
-rw-r--r-- | ext/zip/php_zip.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 0cebe14d99..0d1ab7e022 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -1513,9 +1513,10 @@ static ZIPARCHIVE_METHOD(close) ze_obj = Z_ZIP_P(self); if ((err = zip_close(intern))) { +#if LIBZIP_VERSION_MAJOR == 1 && LIBZIP_VERSION_MINOR == 3 && LIBZIP_VERSION_MICRO == 1 + php_error_docref(NULL, E_WARNING, "%s", "zip_close have failed"); +#else php_error_docref(NULL, E_WARNING, "%s", zip_strerror(intern)); -#if LIBZIP_VERSION_MAJOR < 1 || (LIBZIP_VERSION_MAJOR == 1 && LIBZIP_VERSION_MINOR < 3) || (LIBZIP_VERSION_MAJOR == 1 && LIBZIP_VERSION_MINOR == 3 && LIBZIP_VERSION_MICRO < 1) - /* Fix memory leak in libzip < 1.3.1 */ zip_discard(intern); #endif } |