[openssl-commits] [openssl] OpenSSL_1_1_0-stable update
Rich Salz
rsalz at openssl.org
Tue Nov 8 22:49:01 UTC 2016
The branch OpenSSL_1_1_0-stable has been updated
via daa67522e0d33deadf6ac130ebe08805bb78c3a3 (commit)
from 1bb02559e39cf53ef74656b1965771befcece36a (commit)
- Log -----------------------------------------------------------------
commit daa67522e0d33deadf6ac130ebe08805bb78c3a3
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)
(cherry picked from commit 318447bceb3aa2c50ac0081bdb4e917f8704e7da)
-----------------------------------------------------------------------
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