summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-07-03 12:27:13 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-07-03 12:36:06 +0200
commit0e48e35e0485bc6d6458a45ecab5b19a0c2ec001 (patch)
tree7623c1ae234f8dc3a62779abc96efa383e034066
parent44c8b7414ce96038017edc2fd827f8250669a62a (diff)
downloadphp-git-0e48e35e0485bc6d6458a45ecab5b19a0c2ec001.tar.gz
Fixed bug #78231
-rw-r--r--NEWS4
-rw-r--r--ext/openssl/xp_ssl.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 4c05f42773..c0fb40bb8a 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,10 @@ PHP NEWS
- Date:
. Fixed #69044 (discrepency between time and microtime). (krakjoe)
+- Openssl:
+ . Fixed bug #78231 (Segmentation fault upon stream_socket_accept of exported
+ socket-to-stream). (Nikita)
+
- OPcache:
. Fixed #78189 (file cache strips last character of uname hash). (cmb)
. Fixed #78202 (Opcache stats for cache hits are capped at 32bit NUM). (cmb)
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c
index c8e5692bbe..3df1a1889a 100644
--- a/ext/openssl/xp_ssl.c
+++ b/ext/openssl/xp_ssl.c
@@ -2274,7 +2274,8 @@ static inline int php_openssl_tcp_sockop_accept(php_stream *stream, php_openssl_
xparam->outputs.client = NULL;
- if ((tmpzval = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), "socket", "tcp_nodelay")) != NULL &&
+ if (PHP_STREAM_CONTEXT(stream) &&
+ (tmpzval = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), "socket", "tcp_nodelay")) != NULL &&
zend_is_true(tmpzval)) {
nodelay = 1;
}