From: Antony Dovgal Date: Sat, 4 Dec 2010 21:54:20 +0000 (+0000) Subject: make sure the stream context is present before looking for any options X-Git-Tag: php-5.4.0alpha1~191^2~555 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3722811395fef76193efe805439a8a05c76d5ea7;p=php make sure the stream context is present before looking for any options and fix segfault --- diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index 93ccf2826c..93658876c9 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -373,7 +373,7 @@ static inline int php_openssl_setup_crypto(php_stream *stream, { zval **val; - if (SUCCESS == php_stream_context_get_option( + if (stream->context && SUCCESS == php_stream_context_get_option( stream->context, "ssl", "no_ticket", &val) && zval_is_true(*val)) { SSL_CTX_set_options(sslsock->ctx, SSL_OP_NO_TICKET);