1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-19 10:05:05 -07:00

Don't hardcode type sizes

This commit is contained in:
Frank Denis 2023-09-12 12:51:13 +02:00
parent d2f57c0124
commit 1074191f87
2 changed files with 2 additions and 2 deletions

View File

@ -287,7 +287,7 @@ fe25519_cswap(fe25519 f, fe25519 g, unsigned int b)
static inline void
fe25519_copy(fe25519 h, const fe25519 f)
{
memcpy(h, f, 10 * 4);
memcpy(h, f, 10 * sizeof h[0]);
}
/*

View File

@ -231,7 +231,7 @@ fe25519_cswap(fe25519 f, fe25519 g, unsigned int b)
static inline void
fe25519_copy(fe25519 h, const fe25519 f)
{
memcpy(h, f, 5 * 8);
memcpy(h, f, 5 * sizeof h[0]);
}
/*