diff options
author | van Hauser <vh@thc.org> | 2020-06-29 18:35:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-29 18:35:51 +0200 |
commit | 6d9b29daca46c8912aa9ddf6c053bc8554e9e9f7 (patch) | |
tree | 4c762f1e2cfb4a8741c08b5b60d07c2ae8eee860 /src/afl-performance.c | |
parent | 07648f75ea5ef8f03a92db0c7566da8c229dc27b (diff) | |
parent | 76a2d9b59b23873c8a6d174a2f3c48eba60712fb (diff) | |
download | afl++-6d9b29daca46c8912aa9ddf6c053bc8554e9e9f7.tar.gz |
Merge branch 'text_inputs' into dev
Diffstat (limited to 'src/afl-performance.c')
-rw-r--r-- | src/afl-performance.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/afl-performance.c b/src/afl-performance.c index 0c1697a8..6631f148 100644 --- a/src/afl-performance.c +++ b/src/afl-performance.c @@ -44,10 +44,12 @@ void rand_set_seed(afl_state_t *afl, s64 init_seed) { } -uint64_t rand_next(afl_state_t *afl) { +uint32_t rand_next(afl_state_t *afl) { - const uint64_t result = - rotl(afl->rand_seed[0] + afl->rand_seed[3], 23) + afl->rand_seed[0]; + 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 t = afl->rand_seed[1] << 17; @@ -60,7 +62,7 @@ uint64_t rand_next(afl_state_t *afl) { afl->rand_seed[3] = rotl(afl->rand_seed[3], 45); - return result; + return (uint32_t)result; } |