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: master-post-reformat~812 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4ee356686f72ff849f6f3d58562224ace732b1a6;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 047f69aeed..4720680769 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1457,11 +1457,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