From a2c00fb2101b5704aa348fae8edeeecca833aefc 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 adb32351ca..47a0c7c4ea 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1256,11 +1256,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