diff options
Diffstat (limited to 'crypto/ec/ec_key.c')
-rw-r--r-- | crypto/ec/ec_key.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/ec/ec_key.c b/crypto/ec/ec_key.c index eb14f4e409..0ae1c3f367 100644 --- a/crypto/ec/ec_key.c +++ b/crypto/ec/ec_key.c @@ -947,8 +947,7 @@ int ossl_ec_key_simple_oct2priv(EC_KEY *eckey, const unsigned char *buf, ERR_raise(ERR_LIB_EC, ERR_R_MALLOC_FAILURE); return 0; } - eckey->priv_key = BN_bin2bn(buf, len, eckey->priv_key); - if (eckey->priv_key == NULL) { + if (BN_bin2bn(buf, len, eckey->priv_key) == NULL) { ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB); return 0; } |