diff options
author | Ben Laurie <ben@openssl.org> | 2008-12-13 17:39:53 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 2008-12-13 17:39:53 +0000 |
commit | 19d300d07c95836f908f426af696faa975e8bc4a (patch) | |
tree | d07655f49b205e49ef3791e874c3dbf15f64512c /engines | |
parent | 071920d9f640ff1383016e95a19be76a4f80c798 (diff) |
Return error if DH_new() fails (Coverity ID 150).
Diffstat (limited to 'engines')
-rw-r--r-- | engines/ccgost/gost94_keyx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/ccgost/gost94_keyx.c b/engines/ccgost/gost94_keyx.c index cae22ca0bc..37c4d656ff 100644 --- a/engines/ccgost/gost94_keyx.c +++ b/engines/ccgost/gost94_keyx.c @@ -51,6 +51,8 @@ static int make_cp_exchange_key(BIGNUM *priv_key,EVP_PKEY *pubk, unsigned char * gost_hash_ctx hash_ctx; DH *dh = DH_new(); + if (!dh) + return 0; memset(dh_key,0,128); dh->g = BN_dup(pubk->pkey.dsa->g); dh->p = BN_dup(pubk->pkey.dsa->p); |