mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-13 02:28:09 +00:00
slightly different weighting algo (#1719)
* better seed selection * slightly different weighting calculation * remove unnecessary memset
This commit is contained in:
@ -1223,7 +1223,7 @@ double rand_next_percent(afl_state_t *afl);
|
||||
|
||||
static inline u32 rand_below(afl_state_t *afl, u32 limit) {
|
||||
|
||||
if (limit <= 1) return 0;
|
||||
if (unlikely(limit <= 1)) return 0;
|
||||
|
||||
/* The boundary not being necessarily a power of 2,
|
||||
we need to ensure the result uniformity. */
|
||||
@ -1256,7 +1256,7 @@ static inline u32 rand_below(afl_state_t *afl, u32 limit) {
|
||||
expand havoc mode */
|
||||
static inline u32 rand_below_datalen(afl_state_t *afl, u32 limit) {
|
||||
|
||||
if (limit <= 1) return 0;
|
||||
if (unlikely(limit <= 1)) return 0;
|
||||
|
||||
switch (rand_below(afl, 3)) {
|
||||
|
||||
|
Reference in New Issue
Block a user