aboutsummaryrefslogtreecommitdiffstats
path: root/libkeccak_state_copy.c
diff options
context:
space:
mode:
Diffstat (limited to 'libkeccak_state_copy.c')
-rw-r--r--libkeccak_state_copy.c2
1 files changed, 1 insertions, 1 deletions
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)