summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_lib.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2017-09-22 16:06:52 +0100
committerDr. Stephen Henson <steve@openssl.org>2017-09-22 22:59:42 +0100
commit9e84a42db497e06a38f804b5acd09b6aa4f87db3 (patch)
treef540bd69b0d412561f4d71639704f1117bd6fc46 /ssl/ssl_lib.c
parent6d50589c0434a78733d40d3a0fd7cb97eef1cb94 (diff)
Store groups as uint16_t
Instead of storing supported groups in on-the-wire format store them as parsed uint16_t values. This simplifies handling of groups as the values can be directly used instead of being converted. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4406)
Diffstat (limited to 'ssl/ssl_lib.c')
-rw-r--r--ssl/ssl_lib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 711846dc01..48ce7c179c 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -719,7 +719,8 @@ SSL *SSL_new(SSL_CTX *ctx)
if (ctx->ext.supportedgroups) {
s->ext.supportedgroups =
OPENSSL_memdup(ctx->ext.supportedgroups,
- ctx->ext.supportedgroups_len);
+ ctx->ext.supportedgroups_len
+ * sizeof(ctx->ext.supportedgroups));
if (!s->ext.supportedgroups)
goto err;
s->ext.supportedgroups_len = ctx->ext.supportedgroups_len;