diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2004-04-28 20:25:00 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2004-04-28 20:25:00 +0000 |
commit | 50439c63eba481a933c6a26424b40a5bd4ebd9e3 (patch) | |
tree | 8484a1e668739079d2aa2ddab5086797ba4a131e | |
parent | 6103b2424fe99a9b94580b47ee0671ce41aef3d4 (diff) |
Pass sizeof(*pointer) not sizeof(point) to memset. Karsten Desler.
-rw-r--r-- | lib/libc/hash/md4.c | 6 | ||||
-rw-r--r-- | lib/libc/hash/md5.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/libc/hash/md4.c b/lib/libc/hash/md4.c index 9b8385dd566..330343c659c 100644 --- a/lib/libc/hash/md4.c +++ b/lib/libc/hash/md4.c @@ -1,4 +1,4 @@ -/* $OpenBSD: md4.c,v 1.1 2004/04/28 16:54:00 millert Exp $ */ +/* $OpenBSD: md4.c,v 1.2 2004/04/28 20:24:59 millert Exp $ */ /* * This code implements the MD4 message-digest algorithm. @@ -19,7 +19,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$OpenBSD: md4.c,v 1.1 2004/04/28 16:54:00 millert Exp $"; +static const char rcsid[] = "$OpenBSD: md4.c,v 1.2 2004/04/28 20:24:59 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -182,7 +182,7 @@ MD4Final(unsigned char digest[MD4_DIGEST_LENGTH], MD4_CTX *ctx) MD4Transform(ctx->state, ctx->buffer); htole32_4(ctx->state); memcpy(digest, ctx->state, MD4_DIGEST_LENGTH); - memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ + memset(ctx, 0, sizeof(*ctx)); /* in case it's sensitive */ } diff --git a/lib/libc/hash/md5.c b/lib/libc/hash/md5.c index 1c3475865d6..3b0c782bed7 100644 --- a/lib/libc/hash/md5.c +++ b/lib/libc/hash/md5.c @@ -1,4 +1,4 @@ -/* $OpenBSD: md5.c,v 1.2 2004/04/28 16:52:08 millert Exp $ */ +/* $OpenBSD: md5.c,v 1.3 2004/04/28 20:24:59 millert Exp $ */ /* * This code implements the MD5 message-digest algorithm. @@ -18,7 +18,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$OpenBSD: md5.c,v 1.2 2004/04/28 16:52:08 millert Exp $"; +static const char rcsid[] = "$OpenBSD: md5.c,v 1.3 2004/04/28 20:24:59 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -181,7 +181,7 @@ MD5Final(unsigned char digest[MD5_DIGEST_LENGTH], MD5_CTX *ctx) MD5Transform(ctx->state, ctx->buffer); htole32_4(ctx->state); memcpy(digest, ctx->state, MD5_DIGEST_LENGTH); - memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ + memset(ctx, 0, sizeof(*ctx)); /* in case it's sensitive */ } |