diff options
author | van Hauser <vh@thc.org> | 2020-11-01 21:34:08 +0100 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-11-01 21:34:08 +0100 |
commit | 0fd98ae8b070b05a72b2c47a76f4ea145f9d51c2 (patch) | |
tree | 67b81c3ebc89ee3745edba2acd436908e3ca9b78 /src/afl-fuzz-extras.c | |
parent | a0c0cf97129cc42b98c3ac65aeb9c2ca81db899f (diff) | |
download | afl++-0fd98ae8b070b05a72b2c47a76f4ea145f9d51c2.tar.gz |
added mutation introspection make target
Diffstat (limited to 'src/afl-fuzz-extras.c')
-rw-r--r-- | src/afl-fuzz-extras.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/afl-fuzz-extras.c b/src/afl-fuzz-extras.c index adec986e..171cce96 100644 --- a/src/afl-fuzz-extras.c +++ b/src/afl-fuzz-extras.c @@ -423,8 +423,8 @@ void dedup_extras(afl_state_t *afl) { } if (afl->extras_cnt != orig_cnt) - afl->extras = ck_realloc((void **)&afl->extras, - afl->extras_cnt * sizeof(struct extra_data)); + afl->extras = afl_realloc_exact( + (void **)&afl->extras, afl->extras_cnt * sizeof(struct extra_data)); } @@ -462,16 +462,8 @@ void add_extra(afl_state_t *afl, u8 *mem, u32 len) { } - if (afl->extras) { - - afl->extras = ck_realloc((void **)&afl->extras, - (afl->extras_cnt + 1) * sizeof(struct extra_data)); - - } else { - - afl->extras = ck_alloc((afl->extras_cnt + 1) * sizeof(struct extra_data)); - - } + afl->extras = afl_realloc((void **)&afl->extras, + (afl->extras_cnt + 1) * sizeof(struct extra_data)); if (unlikely(!afl->extras)) { PFATAL("alloc"); } |