tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 49acbfad23df415977fb7a196c6aae2d7406b489
parent aa4f2f739737edd8d1570474ee459d5b98713aba
Author: rl1987 <rl1987@sdf.lonestar.org>
Date:   Mon,  6 May 2019 17:21:11 +0300

Don't forget to use the mutex in testing_enable_prefilled_rng()

Diffstat:
Msrc/test/rng_test_helpers.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/test/rng_test_helpers.c b/src/test/rng_test_helpers.c @@ -185,10 +185,14 @@ testing_enable_prefilled_rng(const void *buffer, size_t buflen) tor_assert(buflen > 0); rng_mutex = tor_mutex_new(); + tor_mutex_acquire(rng_mutex); + prefilled_rng_buffer = tor_memdup(buffer, buflen); prefilled_rng_buflen = buflen; prefilled_rng_idx = 0; + tor_mutex_release(rng_mutex); + MOCK(crypto_rand, crypto_rand_prefilled); MOCK(crypto_strongest_rand_, mock_crypto_strongest_rand); }