From b632f93d47c85ea2523fbfbe1b770f7cdfef2a9f Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 15 Sep 2024 00:26:52 +0200 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libkeccak_spec_rawshake.c | 1 - libkeccak_state_copy.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/libkeccak_spec_rawshake.c b/libkeccak_spec_rawshake.c index 291ff06..99b704c 100644 --- a/libkeccak_spec_rawshake.c +++ b/libkeccak_spec_rawshake.c @@ -3,4 +3,3 @@ extern inline void libkeccak_spec_rawshake(struct libkeccak_spec *, long int, long int); - diff --git a/libkeccak_state_copy.c b/libkeccak_state_copy.c index bf82fa9..abec573 100644 --- a/libkeccak_state_copy.c +++ b/libkeccak_state_copy.c @@ -12,7 +12,7 @@ int libkeccak_state_copy(struct libkeccak_state *restrict dest, const struct libkeccak_state *restrict src) { - memcpy(dest, src, sizeof(struct libkeccak_state)); + *dest = *src; if (src->mlen) { dest->M = malloc(src->mlen * sizeof(char)); if (!dest->M) -- cgit v1.2.3-70-g09d2