com php-src: Fix segfault in php_stream_context_get_opt ion call: NEWS ext/zip/php_zip.h ext/zip/zip_st ream.c
| From: | Remi Collet | Date: | Tue, 11 Jul 2017 09:41:47 +0000 |
| Subject: | com php-src: Fix segfault in php_stream_context_get_opt ion call: NEWS ext/zip/php_zip.h ext/zip/zip_st ream.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-98512@lists.php.net to get a copy of this message | ||
Commit: 2458dce3e5bff026e91e42f292ca7bc0e2b2731c
Author: Remi Collet <remi@php.net> Tue, 11 Jul 2017 11:41:47 +0200
Parents: c620daecb4f8b1552eb3f63f6a699ea315825072
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2458dce3e5bff026e91e42f292ca7bc0e2b2731c
Log:
Fix segfault in php_stream_context_get_option call
Changed paths:
M NEWS
M ext/zip/php_zip.h
M ext/zip/zip_stream.c
Diff:
diff --git a/NEWS b/NEWS
index 7f3bbec..a14fd43 100644
--- a/NEWS
+++ b/NEWS
@@ -54,6 +54,7 @@ PHP NEWS
- ZIP:
. ZipArchive implements countable, added ZipArchive::count() method. (Remi)
+ . Fix segfault in php_stream_context_get_option call. (Remi)
06 Jul 2017, PHP 7.2.0alpha3
diff --git a/ext/zip/php_zip.h b/ext/zip/php_zip.h
index d874c8f..5853097 100644
--- a/ext/zip/php_zip..h
+++ b/ext/zip/php_zip.h
@@ -37,7 +37,7 @@ extern zend_module_entry zip_module_entry;
#define ZIP_OVERWRITE ZIP_TRUNCATE
#endif
-#define PHP_ZIP_VERSION "1.15.0"
+#define PHP_ZIP_VERSION "1.15.1"
#define ZIP_OPENBASEDIR_CHECKPATH(filename) php_check_open_basedir(filename)
diff --git a/ext/zip/zip_stream.c b/ext/zip/zip_stream.c
index 8e7dbcf..fca1854 100644
--- a/ext/zip/zip_stream.c
+++ b/ext/zip/zip_stream.c
@@ -314,7 +314,7 @@ php_stream *php_stream_zip_opener(php_stream_wrapper *wrapper,
if (za) {
zval *tmpzval;
- if (NULL != (tmpzval = php_stream_context_get_option(context, "zip",
"password"))) {
+ if (context && NULL != (tmpzval = php_stream_context_get_option(context, "zip",
"password"))) {
if (Z_TYPE_P(tmpzval) != IS_STRING || zip_set_default_password(za, Z_STRVAL_P(tmpzval))) {
php_error_docref(NULL, E_WARNING, "Can't set zip password");
}