提交 308505b8 编写于 作者: G Günther Noack 提交者: Matt Caswell

Avoid out-of-bounds write in SSL_get_shared_ciphers

PR: 3317
上级 b00676bb
...@@ -1457,6 +1457,9 @@ char *SSL_get_shared_ciphers(const SSL *s,char *buf,int len) ...@@ -1457,6 +1457,9 @@ char *SSL_get_shared_ciphers(const SSL *s,char *buf,int len)
(len < 2)) (len < 2))
return(NULL); return(NULL);
if (sk_SSL_CIPHER_num(sk) == 0)
return NULL;
p=buf; p=buf;
sk=s->session->ciphers; sk=s->session->ciphers;
for (i=0; i<sk_SSL_CIPHER_num(sk); i++) for (i=0; i<sk_SSL_CIPHER_num(sk); i++)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册