Check sk_SSL_CIPHER_num() after assigning sk.

This commit is contained in:
Kurt Roeckx 2014-05-12 18:19:14 +02:00 committed by Matt Caswell
parent a4a442cccf
commit 4ee356686f

View file

@ -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<sk_SSL_CIPHER_num(sk); i++)
{
int n;