diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2011-07-05 20:06:37 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2011-07-05 20:06:37 +0000 |
commit | 74947759f7e48d95d2830cbf77331b7643a5ccd8 (patch) | |
tree | 0e2bac1d1d1d62d368c00abc0cda7114f9746da7 /usr.sbin/bind/lib/isc | |
parent | ff08a269c35183e511286891de09650df0413e6f (diff) |
fix some memset sizeofs, found by jsg. ok deraadt krw
Diffstat (limited to 'usr.sbin/bind/lib/isc')
-rw-r--r-- | usr.sbin/bind/lib/isc/sha2.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/bind/lib/isc/sha2.c b/usr.sbin/bind/lib/isc/sha2.c index 3759f630db3..0b1d9b42307 100644 --- a/usr.sbin/bind/lib/isc/sha2.c +++ b/usr.sbin/bind/lib/isc/sha2.c @@ -445,7 +445,7 @@ isc_sha224_end(isc_sha224_t *context, char buffer[]) { } *buffer = (char)0; } else { - memset(context, 0, sizeof(context)); + memset(context, 0, sizeof(*context)); } memset(digest, 0, ISC_SHA224_DIGESTLENGTH); return buffer; @@ -768,7 +768,7 @@ isc_sha256_final(isc_uint8_t digest[], isc_sha256_t *context) { } /* Clean up state data: */ - memset(context, 0, sizeof(context)); + memset(context, 0, sizeof(*context)); usedspace = 0; } @@ -790,7 +790,7 @@ isc_sha256_end(isc_sha256_t *context, char buffer[]) { } *buffer = (char)0; } else { - memset(context, 0, sizeof(context)); + memset(context, 0, sizeof(*context)); } memset(digest, 0, ISC_SHA256_DIGESTLENGTH); return buffer; @@ -1112,7 +1112,7 @@ void isc_sha512_final(isc_uint8_t digest[], isc_sha512_t *context) { } /* Zero out state data */ - memset(context, 0, sizeof(context)); + memset(context, 0, sizeof(*context)); } char * @@ -1133,7 +1133,7 @@ isc_sha512_end(isc_sha512_t *context, char buffer[]) { } *buffer = (char)0; } else { - memset(context, 0, sizeof(context)); + memset(context, 0, sizeof(*context)); } memset(digest, 0, ISC_SHA512_DIGESTLENGTH); return buffer; @@ -1195,7 +1195,7 @@ isc_sha384_final(isc_uint8_t digest[], isc_sha384_t *context) { } /* Zero out state data */ - memset(context, 0, sizeof(context)); + memset(context, 0, sizeof(*context)); } char * @@ -1216,7 +1216,7 @@ isc_sha384_end(isc_sha384_t *context, char buffer[]) { } *buffer = (char)0; } else { - memset(context, 0, sizeof(context)); + memset(context, 0, sizeof(*context)); } memset(digest, 0, ISC_SHA384_DIGESTLENGTH); return buffer; |