diff options
author | 2003-09-08 00:00:47 +0000 | |
---|---|---|
committer | 2003-09-08 00:00:47 +0000 | |
commit | a7a885f07f3c24f363b5da3762db4ca902f0c241 (patch) | |
tree | 815db95050465a3d0e3e39e49cc888d7991010d3 /lib/libc | |
parent | Make -number be an error (similar to my change in grep.c); OK tedu@ (diff) | |
download | wireguard-openbsd-a7a885f07f3c24f363b5da3762db4ca902f0c241.tar.xz wireguard-openbsd-a7a885f07f3c24f363b5da3762db4ca902f0c241.zip |
Zap context correctly, from Juergen Buchmueller <pullmoll at stop1984 dot com>
Same as sys/crypto/sha2.c revision 1.2
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/hash/sha2.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/hash/sha2.c b/lib/libc/hash/sha2.c index 665e42f3896..8f82de90863 100644 --- a/lib/libc/hash/sha2.c +++ b/lib/libc/hash/sha2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sha2.c,v 1.1 2003/05/08 23:34:55 millert Exp $ */ +/* $OpenBSD: sha2.c,v 1.2 2003/09/08 00:00:47 millert Exp $ */ /* * FILE: sha2.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$OpenBSD: sha2.c,v 1.1 2003/05/08 23:34:55 millert Exp $"; +static const char rcsid[] = "$OpenBSD: sha2.c,v 1.2 2003/09/08 00:00:47 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -557,7 +557,7 @@ void SHA256_Final(u_int8_t digest[], SHA256_CTX *context) { } /* Clean up state data: */ - memset(context, 0, sizeof(context)); + memset(context, 0, sizeof(*context)); usedspace = 0; } @@ -850,7 +850,7 @@ void SHA512_Final(u_int8_t digest[], SHA512_CTX *context) { } /* Zero out state data */ - memset(context, 0, sizeof(context)); + memset(context, 0, sizeof(*context)); } @@ -891,5 +891,5 @@ void SHA384_Final(u_int8_t digest[], SHA384_CTX *context) { } /* Zero out state data */ - memset(context, 0, sizeof(context)); + memset(context, 0, sizeof(*context)); } |