added AFL_MAP_SIZE (wip)

This commit is contained in:
van Hauser
2020-04-17 09:10:49 +02:00
parent 16ce555845
commit 5b70d23211
15 changed files with 116 additions and 76 deletions

View File

@ -249,7 +249,6 @@ void update_bitmap_score(afl_state_t *afl, struct queue_entry *q) {
if (!q->trace_mini) {
u32 len = (afl->fsrv.map_size >> 3);
if (len == 0) len = 1;
q->trace_mini = ck_alloc(len);
minimize_bits(afl, q->trace_mini, afl->fsrv.trace_bits);
@ -272,12 +271,12 @@ void cull_queue(afl_state_t *afl) {
struct queue_entry *q;
u32 len = (afl->fsrv.map_size >> 3);
u32 i;
u8 temp_v[MAP_SIZE >> 3];
if (len == 0) len = 1;
u8 * temp_v;
if (afl->dumb_mode || !afl->score_changed) return;
temp_v = ck_alloc(afl->fsrv.map_size >> 3);
afl->score_changed = 0;
memset(temp_v, 255, len);
@ -325,6 +324,8 @@ void cull_queue(afl_state_t *afl) {
}
ck_free(temp_v);
}
/* Calculate case desirability score to adjust the length of havoc fuzzing.