From 0c62539e8fb5e4b509efab17817079a8d42e271f Mon Sep 17 00:00:00 2001 From: lohhiiccc Date: Mon, 11 May 2026 18:45:35 +0200 Subject: [PATCH] fix: use memcpy instead of for loop for state cpy in shift_coll --- src/whirlpool/whirlpool_compress.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/whirlpool/whirlpool_compress.c b/src/whirlpool/whirlpool_compress.c index 2af8393..f191857 100644 --- a/src/whirlpool/whirlpool_compress.c +++ b/src/whirlpool/whirlpool_compress.c @@ -121,8 +121,7 @@ shift_columns(uint64_t state[8]) | (state[(i - 7 + 8) & 7] & 0x00000000000000FFULL); } - for(uint8_t i = 0; i < 8; ++i) - state[i] = tmp[i]; + memcpy(state, tmp, sizeof(tmp)); } static inline void