提交 318447bc 编写于 作者: F FdaSilvaYY 提交者: Rich Salz

Missing BN_RECP_CTX field init.

BN_RECP_CTX_new direclty use bn_init to avoid twice memset calls
Reviewed-by: NKurt Roeckx <kurt@openssl.org>
Reviewed-by: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1879)
上级 e5e71f28
......@@ -12,10 +12,9 @@
void BN_RECP_CTX_init(BN_RECP_CTX *recp)
{
memset(recp, 0, sizeof(*recp));
bn_init(&(recp->N));
bn_init(&(recp->Nr));
recp->num_bits = 0;
recp->flags = 0;
}
BN_RECP_CTX *BN_RECP_CTX_new(void)
......@@ -25,7 +24,8 @@ BN_RECP_CTX *BN_RECP_CTX_new(void)
if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
return (NULL);
BN_RECP_CTX_init(ret);
bn_init(&(ret->N));
bn_init(&(ret->Nr));
ret->flags = BN_FLG_MALLOCED;
return (ret);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册