From 4ee356686f72ff849f6f3d58562224ace732b1a6 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 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