diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2012-01-04 23:03:20 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2012-01-04 23:03:20 +0000 |
commit | a17b5d5a4f50f50f46d27fc52158455d12833196 (patch) | |
tree | 62322d9b0977002df7a3e2d12ed3ef4786406751 /engines/ccgost/gost94_keyx.c | |
parent | 2f97765bc37cccdac6d6ae5d46aee76b2b445582 (diff) |
Check GOST parameters are not NULL (CVE-2012-0027)
Diffstat (limited to 'engines/ccgost/gost94_keyx.c')
-rw-r--r-- | engines/ccgost/gost94_keyx.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/ccgost/gost94_keyx.c b/engines/ccgost/gost94_keyx.c index 624be586a5..0d7d3ffe6a 100644 --- a/engines/ccgost/gost94_keyx.c +++ b/engines/ccgost/gost94_keyx.c @@ -261,6 +261,10 @@ int pkey_GOST94cp_decrypt(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *key_len } param = get_encryption_params(gkt->key_agreement_info->cipher); + if(!param){ + goto err; + } + gost_init(&cctx,param->sblock); OPENSSL_assert(gkt->key_agreement_info->eph_iv->length==8); memcpy(wrappedKey,gkt->key_agreement_info->eph_iv->data,8); |