diff options
author | van Hauser <vh@thc.org> | 2020-07-21 13:15:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-21 13:15:59 +0200 |
commit | b6e65f98827470745d7df5cf1e38b506b9e839b0 (patch) | |
tree | 602abd8c1a1929aebda3f80665ffe02b435fdd00 /src/afl-performance.c | |
parent | fc5cfc6cb309b072a45b991be117c17396e46a89 (diff) | |
parent | c2b04bdf6c596f5d220f27caead20d09452ed42d (diff) | |
download | afl++-b6e65f98827470745d7df5cf1e38b506b9e839b0.tar.gz |
Merge pull request #461 from AFLplusplus/new_splicing
New splicing
Diffstat (limited to 'src/afl-performance.c')
-rw-r--r-- | src/afl-performance.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/afl-performance.c b/src/afl-performance.c index 6631f148..0c1697a8 100644 --- a/src/afl-performance.c +++ b/src/afl-performance.c @@ -44,12 +44,10 @@ void rand_set_seed(afl_state_t *afl, s64 init_seed) { } -uint32_t rand_next(afl_state_t *afl) { +uint64_t rand_next(afl_state_t *afl) { - const uint32_t result = - (uint32_t)rotl(afl->rand_seed[0] + afl->rand_seed[3], 23) + - afl->rand_seed[0]; - // const uint32_t result = (uint32_t) rotl(afl->rand_seed[1] * 5, 7) * 9; + const uint64_t result = + rotl(afl->rand_seed[0] + afl->rand_seed[3], 23) + afl->rand_seed[0]; const uint64_t t = afl->rand_seed[1] << 17; @@ -62,7 +60,7 @@ uint32_t rand_next(afl_state_t *afl) { afl->rand_seed[3] = rotl(afl->rand_seed[3], 45); - return (uint32_t)result; + return result; } |