diff options
author | vanhauser-thc <vh@thc.org> | 2021-07-20 11:10:58 +0200 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2021-07-20 11:10:58 +0200 |
commit | 3101e9c88df72755b461e82870879fbe9e7429fa (patch) | |
tree | d3afb6268c72b4f103360296434bb4d3c28b8c24 /custom_mutators/gramatron/gramfuzz-helpers.c | |
parent | fff8c49f7c73a1531166ad52fc50306dbd01775f (diff) | |
download | afl++-3101e9c88df72755b461e82870879fbe9e7429fa.tar.gz |
add gramatron
Diffstat (limited to 'custom_mutators/gramatron/gramfuzz-helpers.c')
-rw-r--r-- | custom_mutators/gramatron/gramfuzz-helpers.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/custom_mutators/gramatron/gramfuzz-helpers.c b/custom_mutators/gramatron/gramfuzz-helpers.c index f894c850..378a3d90 100644 --- a/custom_mutators/gramatron/gramfuzz-helpers.c +++ b/custom_mutators/gramatron/gramfuzz-helpers.c @@ -73,7 +73,7 @@ void concatPrefixFeature(Array *prefix, Array *feature) { // the recursive feature. Might want to fix it to choose a random number upper // bounded by a static value instead. terminal *featureptr; - int len = rand() % RECUR_THRESHOLD; + int len = rand_below(global_afl, RECUR_THRESHOLD); for (int x = 0; x < len; x++) { for (int y = 0; y < feature->used; y++) { @@ -149,7 +149,7 @@ Array *gen_input(state *pda, Array *input) { state_ptr = pda + curr_state; // Get a random trigger - randval = rand() % (state_ptr->trigger_len); + randval = rand_below(global_afl, state_ptr->trigger_len); trigger_ptr = (state_ptr->ptr) + randval; // Insert into the dynamic array @@ -187,7 +187,7 @@ Array *gen_input_count(state *pda, Array *input, int *mut_count) { state_ptr = pda + curr_state; // Get a random trigger - randval = rand() % (state_ptr->trigger_len); + randval = rand_below(global_afl, state_ptr->trigger_len); trigger_ptr = (state_ptr->ptr) + randval; // Insert into the dynamic array |