Browse Source

Avoid out-of-bounds write in SSL_get_shared_ciphers

PR: 3317

(Imported from upstream's 8571902e23 and
1f5bce2dce)
kris/onging/CECPQ3_patch15
Adam Langley 10 years ago
parent
commit
041240485d
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      ssl/ssl_lib.c

+ 4
- 0
ssl/ssl_lib.c View File

@@ -1518,6 +1518,10 @@ char *SSL_get_shared_ciphers(const SSL *s,char *buf,int len)


p=buf; p=buf;
sk=s->session->ciphers; sk=s->session->ciphers;

if (sk_SSL_CIPHER_num(sk) == 0)
return NULL;

for (i=0; i<sk_SSL_CIPHER_num(sk); i++) for (i=0; i<sk_SSL_CIPHER_num(sk); i++)
{ {
int n; int n;


Loading…
Cancel
Save