diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-12-10 11:50:02 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-12-10 11:50:02 -0500 |
commit | 4d13cc69ce6e5d29b8c8d207b86dda1584b3fac7 (patch) | |
tree | 1ab52f0bbcb5dc30249bd96da2ab971cd0c330e5 /src | |
parent | 7e0da695e0f0485da1c91c1dd7a4919b273acf01 (diff) | |
download | tor-4d13cc69ce6e5d29b8c8d207b86dda1584b3fac7.tar.gz tor-4d13cc69ce6e5d29b8c8d207b86dda1584b3fac7.zip |
make stack-protector happy
Diffstat (limited to 'src')
-rw-r--r-- | src/common/crypto.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c index 3785074a83..6cef249bb8 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -2529,7 +2529,7 @@ crypto_strongest_rand_raw(uint8_t *out, size_t out_len) void crypto_strongest_rand(uint8_t *out, size_t out_len) { - const unsigned DLEN = SHA512_DIGEST_LENGTH; +#define DLEN SHA512_DIGEST_LENGTH /* We're going to hash DLEN bytes from the system RNG together with some * bytes from the openssl PRNG, in order to yield DLEN bytes. */ @@ -2558,6 +2558,7 @@ crypto_strongest_rand(uint8_t *out, size_t out_len) } memwipe(tmp, 0, sizeof(tmp)); memwipe(inp, 0, sizeof(inp)); +#undef DLEN } /** Seed OpenSSL's random number generator with bytes from the operating |