From 725f95364d9e2083cfd6c8348cfd982436ceef34 Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Fri, 30 Jul 2021 20:42:48 +0700 Subject: [PATCH] fix for memset with small stack --- wolfcrypt/src/ecc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/src/ecc.c b/wolfcrypt/src/ecc.c index 3085ac91e..388bd10d7 100644 --- a/wolfcrypt/src/ecc.c +++ b/wolfcrypt/src/ecc.c @@ -5992,7 +5992,7 @@ int wc_ecc_gen_deterministic_k(const byte* hash, word32 hashSz, if (ret == 0) { /* right shift by bits in hash minus bits in order */ mp_rshb(&z1, (hashSz * WOLFSSL_BIT_SIZE) - qbits); - XMEMSET(h1, 0, sizeof(h1)); + XMEMSET(h1, 0, WC_MAX_DIGEST_SIZE); /* mod reduce by order using conditional subtract */ if (mp_cmp(&z1, order) == MP_GT) {