Fix buffer overflow in SSL_get_shared_ciphers() function.
(CVE-2006-3738) [Tavis Ormandy and Will Drewry, Google Security Team] Fix SSL client code which could crash if connecting to a malicious SSLv2 server. (CVE-2006-4343) [Tavis Ormandy and Will Drewry, Google Security Team]
This commit is contained in:
@@ -1272,7 +1272,7 @@ char *SSL_get_shared_ciphers(const SSL *s,char *buf,int len)
|
||||
c=sk_SSL_CIPHER_value(sk,i);
|
||||
for (cp=c->name; *cp; )
|
||||
{
|
||||
if (len-- == 0)
|
||||
if (len-- <= 0)
|
||||
{
|
||||
*p='\0';
|
||||
return(buf);
|
||||
|
Reference in New Issue
Block a user