Message ID | 20240516090340.61417-3-hadess@hadess.net |
---|---|
State | New |
Headers | show |
Series | Fix a number of static analysis issues #2 | expand |
diff --git a/src/shared/ecc.c b/src/shared/ecc.c index adaae2082e1f..02bccbd430f6 100644 --- a/src/shared/ecc.c +++ b/src/shared/ecc.c @@ -870,6 +870,8 @@ bool ecc_make_key(uint8_t public_key[64], uint8_t private_key[32]) uint64_t priv[NUM_ECC_DIGITS]; unsigned int tries = 0; + memset(&pk, 0, sizeof(pk)); + do { if (!get_random_number(priv) || (tries++ >= MAX_TRIES)) return false;