From 48852da7cdcf8c45abf16a3966d9cc0ec8da24dc Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 5 Jan 2019 14:31:44 +0100 Subject: [PATCH] Improve clarity --- src/libsodium/crypto_generichash/blake2b/ref/blake2b-ref.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libsodium/crypto_generichash/blake2b/ref/blake2b-ref.c b/src/libsodium/crypto_generichash/blake2b/ref/blake2b-ref.c index 4f56b793..a1beacf3 100644 --- a/src/libsodium/crypto_generichash/blake2b/ref/blake2b-ref.c +++ b/src/libsodium/crypto_generichash/blake2b/ref/blake2b-ref.c @@ -98,7 +98,8 @@ blake2b_init0(blake2b_state *S) S->h[i] = blake2b_IV[i]; } /* zero everything between .t and .last_node */ - memset(S->t, 0, offsetof(blake2b_state, last_node) + sizeof(S->last_node) + memset((void *) &S->t, 0, + offsetof(blake2b_state, last_node) + sizeof(S->last_node) - offsetof(blake2b_state, t)); return 0; }