summaryrefslogtreecommitdiff
path: root/src/lib/crypt_ops
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-03-06 10:35:02 -0500
committerNick Mathewson <nickm@torproject.org>2019-04-04 12:56:52 -0400
commit12205c3cbee4e71ded2b5710a57342b510e9d6df (patch)
treea0f1800c2e4c95ce37409fdecf28830188fb161a /src/lib/crypt_ops
parentab6ad3c040de68b1f06b8f910407bff570b24b43 (diff)
downloadtor-12205c3cbee4e71ded2b5710a57342b510e9d6df.tar.gz
tor-12205c3cbee4e71ded2b5710a57342b510e9d6df.zip
Make map_anon expose the result of a noinherit attempt
Previously we did this for tests only, but it's valuable for getting proper fork behavior in rand_fast.
Diffstat (limited to 'src/lib/crypt_ops')
-rw-r--r--src/lib/crypt_ops/crypto_rand_fast.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/crypt_ops/crypto_rand_fast.c b/src/lib/crypt_ops/crypto_rand_fast.c
index 760e1025ed..f1acc9faf2 100644
--- a/src/lib/crypt_ops/crypto_rand_fast.c
+++ b/src/lib/crypt_ops/crypto_rand_fast.c
@@ -134,8 +134,8 @@ crypto_fast_rng_new_from_seed(const uint8_t *seed)
* having it get dumped, swapped, or shared after fork.
*/
crypto_fast_rng_t *result = tor_mmap_anonymous(sizeof(*result),
- ANONMAP_PRIVATE | ANONMAP_NOINHERIT);
-
+ ANONMAP_PRIVATE | ANONMAP_NOINHERIT,
+ NULL);
memcpy(result->buf.seed, seed, SEED_LEN);
/* Causes an immediate refill once the user asks for data. */
result->bytes_left = 0;