From 365e872fa1f019d85114818a9234a37bcad0daef Mon Sep 17 00:00:00 2001 From: Kurt Roeckx Date: Mon, 12 May 2014 18:19:14 +0200 Subject: [PATCH] Check sk_SSL_CIPHER_num() after assigning sk. --- ssl/ssl_lib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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