1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-20 10:37:24 -07:00

Use memcpy() instead of a cast

This commit is contained in:
Frank Denis 2015-11-27 01:18:07 +01:00
parent b40663a10c
commit 38fd43d7d3

View File

@ -605,8 +605,8 @@ poly1305_finish_ext(poly1305_state_internal_t *st, const unsigned char *m,
_mm_storeu_si128((xmmi *)(void *)st + 6, _mm_setzero_si128());
_mm_storeu_si128((xmmi *)(void *)st + 7, _mm_setzero_si128());
*(uint64_t *)(void *)(mac + 0) = h0;
*(uint64_t *)(void *)(mac + 8) = h1;
memcpy(&mac[0], &h0, 8);
memcpy(&mac[8], &h1, 8);
sodium_memzero((void *)st, sizeof *st);
}