cvs: php4(PHP_4_3) /ext/openssl openssl.c

From: Date: Mon, 05 May 2003 16:29:57 +0000
Subject: cvs: php4(PHP_4_3) /ext/openssl openssl.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-20709@lists.php.net to get a copy of this message
wez Mon May 5 12:29:57 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/openssl openssl.c Log: Avoid potential segfault when preparing an SSL stream. Index: php4/ext/openssl/openssl.c diff -u php4/ext/openssl/openssl.c:1.52.2.12 php4/ext/openssl/openssl.c:1.52.2.13 --- php4/ext/openssl/openssl.c:1.52.2.12 Thu May 1 06:44:17 2003 +++ php4/ext/openssl/openssl.c Mon May 5 12:29:57 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: openssl.c,v 1.52.2.12 2003/05/01 10:44:17 wez Exp $ */ +/* $Id: openssl.c,v 1.52.2.13 2003/05/05 16:29:57 wez Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -2967,7 +2967,7 @@ /* SSL verification functions */ -#define GET_VER_OPT(name) SUCCESS == php_stream_context_get_option(stream->context, "ssl", name, &val) +#define GET_VER_OPT(name) (stream->context && SUCCESS == php_stream_context_get_option(stream->context, "ssl", name, &val)) #define GET_VER_OPT_STRING(name, str) if (GET_VER_OPT(name)) { convert_to_string_ex(val); str = Z_STRVAL_PP(val); } static int verify_callback(int preverify_ok, X509_STORE_CTX *ctx)

« previous php.cvs (#20709) next »