From: Günther Noack Date: Thu, 1 May 2014 11:33:11 +0000 (+0200) Subject: Avoid out-of-bounds write in SSL_get_shared_ciphers X-Git-Tag: OpenSSL_0_9_8za~25 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d06ae0fff7635bd914b2c3996f93680a13064976;p=oweals%2Fopenssl.git Avoid out-of-bounds write in SSL_get_shared_ciphers PR: 3317 --- 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