summaryrefslogtreecommitdiff
path: root/lib/libc/hash/md5.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2015-01-15 13:06:00 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2015-01-15 13:06:00 +0000
commit982b97b5bd3344bf8ab9f25588df649cf052eb85 (patch)
treeea00488fec2231bb5aa530f64c4b9d2e4f76543f /lib/libc/hash/md5.c
parent353fcd36fc6d76d190995196ec7069ab62fa3d00 (diff)
Use explicit_bzero instead of memset in hash Final and End functions.
OK deraadt@ djm@
Diffstat (limited to 'lib/libc/hash/md5.c')
-rw-r--r--lib/libc/hash/md5.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/hash/md5.c b/lib/libc/hash/md5.c
index b7a4e5ef33d..2428ed526c0 100644
--- a/lib/libc/hash/md5.c
+++ b/lib/libc/hash/md5.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: md5.c,v 1.9 2014/01/08 06:14:57 tedu Exp $ */
+/* $OpenBSD: md5.c,v 1.10 2015/01/15 13:05:59 millert Exp $ */
/*
* This code implements the MD5 message-digest algorithm.
@@ -128,7 +128,7 @@ MD5Final(unsigned char digest[MD5_DIGEST_LENGTH], MD5_CTX *ctx)
MD5Pad(ctx);
for (i = 0; i < 4; i++)
PUT_32BIT_LE(digest + i * 4, ctx->state[i]);
- memset(ctx, 0, sizeof(*ctx));
+ explicit_bzero(ctx, sizeof(*ctx));
}