[openssl-commits] [openssl] OpenSSL_1_1_0-stable update
Matt Caswell
matt at openssl.org
Tue Jan 24 17:08:10 UTC 2017
The branch OpenSSL_1_1_0-stable has been updated
via 722d42e1ea710ba036563a68dc7c4e987bf4991b (commit)
from c088325b42cee1236f7b4996dd71f93ecc95bd5d (commit)
- Log -----------------------------------------------------------------
commit 722d42e1ea710ba036563a68dc7c4e987bf4991b
Author: Benjamin Kaduk <bkaduk at akamai.com>
Date: Tue Jan 24 10:50:21 2017 -0600
Do not overallocate for tmp.ciphers_raw
Well, not as much, at least.
Commit 07afdf3c3ac97af4f2b4eec22a97f7230f8227e0 changed things so
that for SSLv2 format ClientHellos we store the cipher list in the
TLS format, i.e., with two bytes per cipher, to be consistent with
historical behavior.
However, the space allocated for the array still performed the computation
with three bytes per cipher, a needless over-allocation (though a relatively
small one, all things considered).
Reviewed-by: Rich Salz <rsalz at openssl.org>
Reviewed-by: Matt Caswell <matt at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2281)
(cherry picked from commit f1429b85c5821e55224e5878da9d0fa420a41f71)
-----------------------------------------------------------------------
Summary of changes:
ssl/statem/statem_srvr.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ssl/statem/statem_srvr.c b/ssl/statem/statem_srvr.c
index d367c21..d36d194 100644
--- a/ssl/statem/statem_srvr.c
+++ b/ssl/statem/statem_srvr.c
@@ -3276,7 +3276,8 @@ STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s,
* slightly over allocate because we won't store those. But that isn't a
* problem.
*/
- raw = s->s3->tmp.ciphers_raw = OPENSSL_malloc(numciphers * n);
+ raw = OPENSSL_malloc(numciphers * TLS_CIPHER_LEN);
+ s->s3->tmp.ciphers_raw = raw;
if (raw == NULL) {
*al = SSL_AD_INTERNAL_ERROR;
goto err;
More information about the openssl-commits
mailing list