summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_lib.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-06-24 23:37:27 +0100
committerMatt Caswell <matt@openssl.org>2016-06-30 15:51:57 +0100
commit3ce2fdabe6e33952bf3011acf5b68107e6352603 (patch)
tree1db552127f77d0e0615ea2e3019183fd64b9e8dd /crypto/bn/bn_lib.c
parent6f4ae777f5100715a96b45355a1195c2efa96b4e (diff)
Convert memset calls to OPENSSL_cleanse
Ensure things really do get cleared when we intend them to. Addresses an OCAP Audit issue. Reviewed-by: Andy Polyakov <appro@openssl.org>
Diffstat (limited to 'crypto/bn/bn_lib.c')
-rw-r--r--crypto/bn/bn_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c
index 90df3eee3b..b606cc9c32 100644
--- a/crypto/bn/bn_lib.c
+++ b/crypto/bn/bn_lib.c
@@ -445,7 +445,7 @@ void BN_clear(BIGNUM *a)
{
bn_check_top(a);
if (a->d != NULL)
- memset(a->d, 0, sizeof(*a->d) * a->dmax);
+ OPENSSL_cleanse(a->d, sizeof(*a->d) * a->dmax);
a->top = 0;
a->neg = 0;
}