[openssl-commits] [openssl] master update
Kurt Roeckx
kurt at openssl.org
Sat Sep 23 15:20:25 UTC 2017
The branch master has been updated
via b92d7b62f585357cb88462cc3c8e2685ca646f8f (commit)
via 9b01779cbf321d23fe45cc7e3abe7a2081ab69d4 (commit)
from 4708afcb0a8bf0bc4135eebbfdb96ab80ba73bc6 (commit)
- Log -----------------------------------------------------------------
commit b92d7b62f585357cb88462cc3c8e2685ca646f8f
Author: Kurt Roeckx <kurt at roeckx.be>
Date: Sat Sep 23 16:17:22 2017 +0200
Use size of entries, not size of the pointer.
Reviewed-by: Andy Polyakov <appro at openssl.org>
GH: #4410
commit 9b01779cbf321d23fe45cc7e3abe7a2081ab69d4
Author: Kurt Roeckx <kurt at roeckx.be>
Date: Sat Sep 23 14:49:03 2017 +0200
Use curve_id not the nid
Found by OSS-Fuzz and the tests
Reviewed-by: Andy Polyakov <appro at openssl.org>
GH: #4410
-----------------------------------------------------------------------
Summary of changes:
ssl/ssl_lib.c | 2 +-
ssl/t1_lib.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 48ce7c1..e04feec 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -720,7 +720,7 @@ SSL *SSL_new(SSL_CTX *ctx)
s->ext.supportedgroups =
OPENSSL_memdup(ctx->ext.supportedgroups,
ctx->ext.supportedgroups_len
- * sizeof(ctx->ext.supportedgroups));
+ * sizeof(*ctx->ext.supportedgroups));
if (!s->ext.supportedgroups)
goto err;
s->ext.supportedgroups_len = ctx->ext.supportedgroups_len;
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c
index fd26595..67b06f2 100644
--- a/ssl/t1_lib.c
+++ b/ssl/t1_lib.c
@@ -462,7 +462,7 @@ int tls1_set_groups_list(uint16_t **pext, size_t *pextlen, const char *str)
static int tls1_set_ec_id(uint16_t *pcurve_id, unsigned char *comp_id,
EC_KEY *ec)
{
- int id;
+ int curve_nid;
const EC_GROUP *grp;
if (!ec)
return 0;
@@ -471,8 +471,8 @@ static int tls1_set_ec_id(uint16_t *pcurve_id, unsigned char *comp_id,
if (!grp)
return 0;
/* Determine curve ID */
- id = EC_GROUP_get_curve_name(grp);
- *pcurve_id = tls1_ec_nid2curve_id(id);
+ curve_nid = EC_GROUP_get_curve_name(grp);
+ *pcurve_id = tls1_ec_nid2curve_id(curve_nid);
/* If no id return error: we don't support arbitrary explicit curves */
if (*pcurve_id == 0)
return 0;
@@ -482,7 +482,7 @@ static int tls1_set_ec_id(uint16_t *pcurve_id, unsigned char *comp_id,
if (EC_KEY_get_conv_form(ec) == POINT_CONVERSION_UNCOMPRESSED) {
*comp_id = TLSEXT_ECPOINTFORMAT_uncompressed;
} else {
- if ((nid_list[id - 1].flags & TLS_CURVE_TYPE) == TLS_CURVE_PRIME)
+ if ((nid_list[*pcurve_id - 1].flags & TLS_CURVE_TYPE) == TLS_CURVE_PRIME)
*comp_id = TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime;
else
*comp_id = TLSEXT_ECPOINTFORMAT_ansiX962_compressed_char2;
More information about the openssl-commits
mailing list