diff options
author | Günther Noack <gnoack@google.com> | 2014-05-01 13:33:11 +0200 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2014-05-12 00:04:57 +0100 |
commit | d06ae0fff7635bd914b2c3996f93680a13064976 (patch) | |
tree | 71b14d1e49c377352feb4934a6ae27d9bdaa0874 /ssl | |
parent | afa2ea204ef6f2a818886aa0506c938bb343547e (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 26fbe87fbf..adb32351ca 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1256,6 +1256,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++) |