diff options
author | Günther Noack <gnoack@google.com> | 2014-05-01 13:33:11 +0200 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2014-05-11 23:59:38 +0100 |
commit | 12cbba0d549895d2c743c4517d0a7fe2d6cac2d7 (patch) | |
tree | 1ab73e129e8fb4926697593436ebbbedb2aedc39 /ssl | |
parent | f9f6befa1fe7da4ad4f43a7873f6e586e03c7568 (diff) |
Avoid out-of-bounds write in SSL_get_shared_ciphers
PR: 3317
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/ssl_lib.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index cfe40b2fa4..4f2a2715de 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -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++) |