diff options
author | 2018-05-12 17:31:41 +0000 | |
---|---|---|
committer | 2018-05-12 17:31:41 +0000 | |
commit | edf3a05cb38e4243d43ce6a299db4be82f09a542 (patch) | |
tree | f26186c39c02d77e780069a2a2be87730b5a34a6 /lib | |
parent | If we fail to decode an EC point format extension, send a decode_error (diff) | |
download | wireguard-openbsd-edf3a05cb38e4243d43ce6a299db4be82f09a542.tar.xz wireguard-openbsd-edf3a05cb38e4243d43ce6a299db4be82f09a542.zip |
Use explicit_bzero() rather than memset() when clearing a BIGNUM.
ok bcook@ tb@
Diffstat (limited to 'lib')
-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; } |