Avoid out-of-bounds write in SSL_get_shared_ciphers
PR: 3317
This commit is contained in:
parent
f9f6befa1f
commit
12cbba0d54
1 changed files with 3 additions and 0 deletions
|
@ -1320,6 +1320,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++)
|
||||
|
|
Loading…
Reference in a new issue