Avoid out-of-bounds write in SSL_get_shared_ciphers

PR: 3317
This commit is contained in:
Günther Noack 2014-05-01 13:33:11 +02:00 committed by Matt Caswell
parent afa2ea204e
commit d06ae0fff7

View file

@ -1256,6 +1256,9 @@ char *SSL_get_shared_ciphers(const SSL *s,char *buf,int len)
(len < 2))
return(NULL);
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++)