From 82818daf1ffa31b0f8a247ec51eee5cf68cb79ab Mon Sep 17 00:00:00 2001 From: Thibault Martinez Date: Fri, 21 Feb 2020 13:50:47 +0100 Subject: [PATCH] Fix bigint converter memset (#16) --- common/crypto/kerl/converter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/crypto/kerl/converter.c b/common/crypto/kerl/converter.c index f5e7a10..c9e0529 100644 --- a/common/crypto/kerl/converter.c +++ b/common/crypto/kerl/converter.c @@ -52,7 +52,7 @@ void convert_trits_to_bytes(trit_t const *const trits, uint8_t *const bytes) { uint32_t *base = (uint32_t *)bytes; uint64_t v; - memset(base, 0, INT_LEN); + memset(base, 0, INT_LEN * sizeof(uint32_t)); for (i = 0; i < TRIT_LEN - 1; i++) { if (trits[i] != -1) {