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; }