mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Release Fixes
1. The RNG internal state could be a memory leak if the seed generate test fails. If the seed test fails, you have bigger problems.
This commit is contained in:
@ -772,6 +772,11 @@ static int _InitRng(WC_RNG* rng, byte* nonce, word32 nonceSz,
|
|||||||
|
|
||||||
if (ret == DRBG_SUCCESS)
|
if (ret == DRBG_SUCCESS)
|
||||||
ret = Hash_DRBG_Generate(rng->drbg, NULL, 0);
|
ret = Hash_DRBG_Generate(rng->drbg, NULL, 0);
|
||||||
|
|
||||||
|
if (ret != DRBG_SUCCESS) {
|
||||||
|
XFREE(rng->drbg, rng->heap, DYNAMIC_TYPE_RNG);
|
||||||
|
rng->drbg = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ForceZero(seed, seedSz);
|
ForceZero(seed, seedSz);
|
||||||
|
Reference in New Issue
Block a user