diff options
author | van Hauser <vh@thc.org> | 2020-08-09 01:19:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-09 01:19:55 +0200 |
commit | 8a1cf3f0f923c98e382ab30f1638a6e31e2e5ac8 (patch) | |
tree | 4f704f3198af3ebad8768517e290844434876cf5 | |
parent | 45d0e4765e9b60f4107fcf87a128ce521bf2665b (diff) | |
parent | 9a1d526ed408cbd7d681be15c5512032f7632887 (diff) | |
download | afl++-8a1cf3f0f923c98e382ab30f1638a6e31e2e5ac8.tar.gz |
Merge pull request #497 from murx-/dev
Add support for specific custom mutator name
-rw-r--r-- | include/afl-fuzz.h | 1 | ||||
-rw-r--r-- | src/afl-fuzz-mutators.c | 1 | ||||
-rw-r--r-- | src/afl-fuzz-one.c | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/include/afl-fuzz.h b/include/afl-fuzz.h index bb1bb314..51ab0e85 100644 --- a/include/afl-fuzz.h +++ b/include/afl-fuzz.h @@ -656,6 +656,7 @@ typedef struct afl_state { struct custom_mutator { const char *name; + char * name_short; void * dh; u8 * post_process_buf; size_t post_process_size; diff --git a/src/afl-fuzz-mutators.c b/src/afl-fuzz-mutators.c index b30106a0..0fa646f9 100644 --- a/src/afl-fuzz-mutators.c +++ b/src/afl-fuzz-mutators.c @@ -142,6 +142,7 @@ struct custom_mutator *load_custom_mutator(afl_state_t *afl, const char *fn) { struct custom_mutator *mutator = ck_alloc(sizeof(struct custom_mutator)); mutator->name = fn; + mutator->name_short = strrchr(fn, '/') + 1; ACTF("Loading custom mutator library from '%s'...", fn); dh = dlopen(fn, RTLD_NOW); diff --git a/src/afl-fuzz-one.c b/src/afl-fuzz-one.c index 74e09ee3..452c5298 100644 --- a/src/afl-fuzz-one.c +++ b/src/afl-fuzz-one.c @@ -1683,6 +1683,8 @@ custom_mutator_stage: has_custom_fuzz = true; + afl->stage_short = el->name_short; + for (afl->stage_cur = 0; afl->stage_cur < afl->stage_max; ++afl->stage_cur) { |