Avoid out-of-bounds write in SSL_get_shared_ciphers
PR: 3317 (Imported from upstream's 8571902e238ba2ef1517185c2a662c03f51dc1bf and 1f5bce2dcebbb5059c2a5ecf4037432e8041cc07)
This commit is contained in:
parent
9611cfcb9f
commit
041240485d
@ -1518,6 +1518,10 @@ char *SSL_get_shared_ciphers(const SSL *s,char *buf,int len)
|
||||
|
||||
p=buf;
|
||||
sk=s->session->ciphers;
|
||||
|
||||
if (sk_SSL_CIPHER_num(sk) == 0)
|
||||
return NULL;
|
||||
|
||||
for (i=0; i<sk_SSL_CIPHER_num(sk); i++)
|
||||
{
|
||||
int n;
|
||||
|
Loading…
Reference in New Issue
Block a user