Skip to content

Commit 3722811

Browse files
committed
make sure the stream context is present before looking for any options
and fix segfault
1 parent 74484db commit 3722811

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/openssl/xp_ssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ static inline int php_openssl_setup_crypto(php_stream *stream,
373373
{
374374
zval **val;
375375

376-
if (SUCCESS == php_stream_context_get_option(
376+
if (stream->context && SUCCESS == php_stream_context_get_option(
377377
stream->context, "ssl", "no_ticket", &val) &&
378378
zval_is_true(*val)) {
379379
SSL_CTX_set_options(sslsock->ctx, SSL_OP_NO_TICKET);

0 commit comments

Comments
 (0)