about summary refs log tree commit diff
path: root/src/afl-fuzz-mutators.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2021-01-20 14:00:26 +0100
committerGitHub <noreply@github.com>2021-01-20 14:00:26 +0100
commitb9e855b7b5ef3d7f367b32ee03459a9f5b21360f (patch)
tree4689cb46e0d543af889609e260b1ff03455a2701 /src/afl-fuzz-mutators.c
parent2cd3010f824fe35b68fbdfbba832357e952bf9d6 (diff)
parent02079d8ef9c1661e4badd464ebcd7668e88118fc (diff)
downloadafl++-b9e855b7b5ef3d7f367b32ee03459a9f5b21360f.tar.gz
Merge pull request #695 from joeyjiaojg/dev
Fix Porting of AFLplusplus for Android
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);