diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2018-05-12 17:31:42 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2018-05-12 17:31:42 +0000 |
commit | 4ad11968791ec4e2338a1c625403d4cc1d15bea2 (patch) | |
tree | f4b5f0190ddc58cd91d14b2ebadba80a14a2e014 /lib/libcrypto | |
parent | e879472e227c24149035699ca005e66b8cb822f8 (diff) |
Use explicit_bzero() rather than memset() when clearing a BIGNUM.
ok bcook@ tb@
Diffstat (limited to 'lib/libcrypto')
-rw-r--r-- | lib/libcrypto/bn/bn_lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcrypto/bn/bn_lib.c b/lib/libcrypto/bn/bn_lib.c index ffb5ee7c2eb..c480ae8b9db 100644 --- a/lib/libcrypto/bn/bn_lib.c +++ b/lib/libcrypto/bn/bn_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_lib.c,v 1.39 2018/02/20 17:13:14 jsing Exp $ */ +/* $OpenBSD: bn_lib.c,v 1.40 2018/05/12 17:31:41 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -529,7 +529,7 @@ BN_clear(BIGNUM *a) { bn_check_top(a); if (a->d != NULL) - memset(a->d, 0, a->dmax * sizeof(a->d[0])); + explicit_bzero(a->d, a->dmax * sizeof(a->d[0])); a->top = 0; a->neg = 0; } |