about summary refs log tree commit diff
path: root/src/afl-fuzz-mutators.c
diff options
context:
space:
mode:
authorJoey Jiao <joeyjiaojg@163.com>2021-01-19 09:44:59 +0800
committerJoey Jiao <joeyjiaojg@163.com>2021-01-20 15:46:41 +0800
commitac1117ffaeec0bd3c593063a05d8aa000d162d47 (patch)
tree6e91c4541fddc2d5c4626dfb643a6f918d94a35d /src/afl-fuzz-mutators.c
parent7ad8f6c7176c26c4fdbd80cec33f969235055839 (diff)
downloadafl++-ac1117ffaeec0bd3c593063a05d8aa000d162d47.tar.gz
android: Fix runtime for mutator
Diffstat (limited to 'src/afl-fuzz-mutators.c')
-rw-r--r--src/afl-fuzz-mutators.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/afl-fuzz-mutators.c b/src/afl-fuzz-mutators.c
index 089707b9..80df6d08 100644
--- a/src/afl-fuzz-mutators.c
+++ b/src/afl-fuzz-mutators.c
@@ -141,7 +141,10 @@ 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;
+  if (memchr(fn, '/', strlen(fn)))
+    mutator->name_short = strrchr(fn, '/') + 1;
+  else
+    mutator->name_short = strdup(fn);
   ACTF("Loading custom mutator library from '%s'...", fn);
 
   dh = dlopen(fn, RTLD_NOW);