提交 19d300d0 编写于 作者: B Ben Laurie

Return error if DH_new() fails (Coverity ID 150).

上级 071920d9
...@@ -51,6 +51,8 @@ static int make_cp_exchange_key(BIGNUM *priv_key,EVP_PKEY *pubk, unsigned char * ...@@ -51,6 +51,8 @@ static int make_cp_exchange_key(BIGNUM *priv_key,EVP_PKEY *pubk, unsigned char *
gost_hash_ctx hash_ctx; gost_hash_ctx hash_ctx;
DH *dh = DH_new(); DH *dh = DH_new();
if (!dh)
return 0;
memset(dh_key,0,128); memset(dh_key,0,128);
dh->g = BN_dup(pubk->pkey.dsa->g); dh->g = BN_dup(pubk->pkey.dsa->g);
dh->p = BN_dup(pubk->pkey.dsa->p); dh->p = BN_dup(pubk->pkey.dsa->p);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册