[openssl-commits] [openssl] master update
Rich Salz
rsalz at openssl.org
Tue Nov 8 22:48:29 UTC 2016
The branch master has been updated
via 318447bceb3aa2c50ac0081bdb4e917f8704e7da (commit)
from e5e71f2857275189577ab7b227608ab4ec985471 (commit)
- Log -----------------------------------------------------------------
commit 318447bceb3aa2c50ac0081bdb4e917f8704e7da
Author: FdaSilvaYY <fdasilvayy at gmail.com>
Date: Tue Nov 8 19:22:09 2016 +0100
Missing BN_RECP_CTX field init.
BN_RECP_CTX_new direclty use bn_init to avoid twice memset calls
Reviewed-by: Kurt Roeckx <kurt at openssl.org>
Reviewed-by: Rich Salz <rsalz at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1879)
-----------------------------------------------------------------------
Summary of changes:
crypto/bn/bn_recp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/crypto/bn/bn_recp.c b/crypto/bn/bn_recp.c
index e532b6e..20585b9 100644
--- a/crypto/bn/bn_recp.c
+++ b/crypto/bn/bn_recp.c
@@ -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);
}
More information about the openssl-commits
mailing list