From: Kurt Roeckx Date: Mon, 12 May 2014 16:19:14 +0000 (+0200) Subject: Check sk_SSL_CIPHER_num() after assigning sk. X-Git-Tag: OpenSSL_1_0_0m~32 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=365e872fa1f019d85114818a9234a37bcad0daef;p=oweals%2Fopenssl.git Check sk_SSL_CIPHER_num() after assigning sk. --- diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 4f2a2715de..caf7554447 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1320,11 +1320,12 @@ char *SSL_get_shared_ciphers(const SSL *s,char *buf,int len) (len < 2)) return(NULL); + p=buf; + sk=s->session->ciphers; + if (sk_SSL_CIPHER_num(sk) == 0) return NULL; - p=buf; - sk=s->session->ciphers; for (i=0; i