From c0507fba252a17529de85a87307cc6c941111044 Mon Sep 17 00:00:00 2001 From: Juno Date: Thu, 26 Sep 2024 11:15:19 +0300 Subject: [PATCH] Update blake2s.h Changed state->t[0] = 0; state->t[1] = 0; To memset(state->t, 0, sizeof(state->t)); memset(state->f, 0, sizeof(state->f)); --- include/crypto/blake2s.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/crypto/blake2s.h b/include/crypto/blake2s.h index f9ffd39194eb..d76966c06ccf 100644 --- a/include/crypto/blake2s.h +++ b/include/crypto/blake2s.h @@ -54,10 +54,8 @@ static inline void __blake2s_init(struct blake2s_state *state, size_t outlen, state->h[5] = BLAKE2S_IV5; state->h[6] = BLAKE2S_IV6; state->h[7] = BLAKE2S_IV7; - state->t[0] = 0; - state->t[1] = 0; - state->f[0] = 0; - state->f[1] = 0; + memset(state->t, 0, sizeof(state>t)); + memset(state->f, 0, sizeof(state>f)); state->buflen = 0; state->outlen = outlen; if (keylen) {