summaryrefslogtreecommitdiffstats
path: root/Source/cm_sha2.c
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cm_sha2.c')
-rw-r--r--Source/cm_sha2.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/Source/cm_sha2.c b/Source/cm_sha2.c
index b1798a8..12c39ed 100644
--- a/Source/cm_sha2.c
+++ b/Source/cm_sha2.c
@@ -704,7 +704,7 @@ void SHA1_Final(sha_byte digest[], SHA_CTX* context) {
* No digest buffer, so we can do nothing
* except clean up and go home
*/
- MEMSET_BZERO(context, sizeof(context));
+ MEMSET_BZERO(context, sizeof(*context));
return;
}
@@ -760,7 +760,7 @@ void SHA1_Final(sha_byte digest[], SHA_CTX* context) {
#endif
/* Clean up: */
- MEMSET_BZERO(context, sizeof(context));
+ MEMSET_BZERO(context, sizeof(*context));
}
char *SHA1_End(SHA_CTX* context, char buffer[]) {
@@ -780,7 +780,7 @@ char *SHA1_End(SHA_CTX* context, char buffer[]) {
}
*buffer = (char)0;
} else {
- MEMSET_BZERO(context, sizeof(context));
+ MEMSET_BZERO(context, sizeof(*context));
}
MEMSET_BZERO(digest, SHA1_DIGEST_LENGTH);
return buffer;
@@ -1099,7 +1099,7 @@ void SHA256_Final(sha_byte digest[], SHA_CTX* context) {
}
/* Clean up state data: */
- MEMSET_BZERO(context, sizeof(context));
+ MEMSET_BZERO(context, sizeof(*context));
}
char *SHA256_End(SHA_CTX* context, char buffer[]) {
@@ -1119,7 +1119,7 @@ char *SHA256_End(SHA_CTX* context, char buffer[]) {
}
*buffer = (char)0;
} else {
- MEMSET_BZERO(context, sizeof(context));
+ MEMSET_BZERO(context, sizeof(*context));
}
MEMSET_BZERO(digest, SHA256_DIGEST_LENGTH);
return buffer;
@@ -1173,7 +1173,7 @@ void SHA224_Final(sha_byte digest[], SHA_CTX* context) {
}
/* Clean up state data: */
- MEMSET_BZERO(context, sizeof(context));
+ MEMSET_BZERO(context, sizeof(*context));
}
char *SHA224_End(SHA_CTX* context, char buffer[]) {
@@ -1193,7 +1193,7 @@ char *SHA224_End(SHA_CTX* context, char buffer[]) {
}
*buffer = (char)0;
} else {
- MEMSET_BZERO(context, sizeof(context));
+ MEMSET_BZERO(context, sizeof(*context));
}
MEMSET_BZERO(digest, SHA224_DIGEST_LENGTH);
return buffer;
@@ -1508,7 +1508,7 @@ void SHA512_Final(sha_byte digest[], SHA_CTX* context) {
}
/* Zero out state data */
- MEMSET_BZERO(context, sizeof(context));
+ MEMSET_BZERO(context, sizeof(*context));
}
char *SHA512_End(SHA_CTX* context, char buffer[]) {
@@ -1528,7 +1528,7 @@ char *SHA512_End(SHA_CTX* context, char buffer[]) {
}
*buffer = (char)0;
} else {
- MEMSET_BZERO(context, sizeof(context));
+ MEMSET_BZERO(context, sizeof(*context));
}
MEMSET_BZERO(digest, SHA512_DIGEST_LENGTH);
return buffer;
@@ -1578,7 +1578,7 @@ void SHA384_Final(sha_byte digest[], SHA_CTX* context) {
}
/* Zero out state data */
- MEMSET_BZERO(context, sizeof(context));
+ MEMSET_BZERO(context, sizeof(*context));
}
char *SHA384_End(SHA_CTX* context, char buffer[]) {
@@ -1598,7 +1598,7 @@ char *SHA384_End(SHA_CTX* context, char buffer[]) {
}
*buffer = (char)0;
} else {
- MEMSET_BZERO(context, sizeof(context));
+ MEMSET_BZERO(context, sizeof(*context));
}
MEMSET_BZERO(digest, SHA384_DIGEST_LENGTH);
return buffer;