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:52:47 +0100 |
commit | 308505b838e4e3ce8485bb30f5b26e2766dc7f8b (patch) | |
tree | c4fe69f8f261f3914b73ad3a5a45ee4b48895c67 | |
parent | b00676bb6f75ecc10d838a844cc9b54c36a4ba0b (diff) | |
download | openssl-308505b838e4e3ce8485bb30f5b26e2766dc7f8b.tar.gz |
Avoid out-of-bounds write in SSL_get_shared_ciphers
PR: 3317
-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 c6ca1379a0..047f69aeed 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1457,6 +1457,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++) |