diff options
author | Billy Brumley <bbrumley@gmail.com> | 2016-01-21 14:06:57 +0200 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-01-21 14:14:33 +0000 |
commit | 2b80d00e3ac652377ace84c51b53f51a1b7e1ba2 (patch) | |
tree | 3afa1910729343b4a8fbfacc4067e88dfc2f0e11 /crypto/ec | |
parent | 78a140ecb3e443b52b644297e7509e5254ae0933 (diff) |
RT3863 ECC: Add missing NULL check. Set a flag
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit dd67493c344d9d98413d2ee7fd2b6fa9411d975c)
Diffstat (limited to 'crypto/ec')
-rw-r--r-- | crypto/ec/ec2_smpl.c | 1 | ||||
-rw-r--r-- | crypto/ec/ec_key.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/crypto/ec/ec2_smpl.c b/crypto/ec/ec2_smpl.c index 077c7fc8dd..5b27b91fcc 100644 --- a/crypto/ec/ec2_smpl.c +++ b/crypto/ec/ec2_smpl.c @@ -746,6 +746,7 @@ int ec_GF2m_simple_make_affine(const EC_GROUP *group, EC_POINT *point, goto err; if (!BN_one(&point->Z)) goto err; + point->Z_is_one = 1; ret = 1; diff --git a/crypto/ec/ec_key.c b/crypto/ec/ec_key.c index c784b6fd30..bc94ab5661 100644 --- a/crypto/ec/ec_key.c +++ b/crypto/ec/ec_key.c @@ -387,6 +387,8 @@ int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x, tx = BN_CTX_get(ctx); ty = BN_CTX_get(ctx); + if (ty == NULL) + goto err; #ifndef OPENSSL_NO_EC2M tmp_nid = EC_METHOD_get_field_type(EC_GROUP_method_of(key->group)); |