summaryrefslogtreecommitdiffstats
path: root/digest-libc.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2014-02-04 01:25:45 +0100
committerDamien Miller <djm@mindrot.org>2014-02-04 01:25:45 +0100
commitdb3c595ea74ea9ccd5aa644d7e1f8dc675710731 (patch)
treedd9d8db7429fc311131c4dd965296dc672bef269 /digest-libc.c
parent - djm@cvs.openbsd.org 2014/02/03 23:28:00 (diff)
downloadopenssh-db3c595ea74ea9ccd5aa644d7e1f8dc675710731.tar.xz
openssh-db3c595ea74ea9ccd5aa644d7e1f8dc675710731.zip
- djm@cvs.openbsd.org 2014/02/02 03:44:31
[digest-libc.c digest-openssl.c] convert memset of potentially-private data to explicit_bzero()
Diffstat (limited to 'digest-libc.c')
-rw-r--r--digest-libc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/digest-libc.c b/digest-libc.c
index e1fcda71a..1804b0698 100644
--- a/digest-libc.c
+++ b/digest-libc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: digest-libc.c,v 1.1 2014/01/28 20:13:46 markus Exp $ */
+/* $OpenBSD: digest-libc.c,v 1.2 2014/02/02 03:44:31 djm Exp $ */
/*
* Copyright (c) 2013 Damien Miller <djm@mindrot.org>
* Copyright (c) 2014 Markus Friedl. All rights reserved.
@@ -209,9 +209,9 @@ ssh_digest_free(struct ssh_digest_ctx *ctx)
if (ctx != NULL) {
digest = ssh_digest_by_alg(ctx->alg);
if (digest) {
- memset(ctx->mdctx, 0, digest->ctx_len);
+ explicit_bzero(ctx->mdctx, digest->ctx_len);
free(ctx->mdctx);
- memset(ctx, 0, sizeof(*ctx));
+ explicit_bzero(ctx, sizeof(*ctx));
free(ctx);
}
}