diff options
author | van Hauser <vh@thc.org> | 2020-05-17 00:13:55 +0200 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-05-17 00:13:55 +0200 |
commit | 9dd3e3e38a6f9643a4850099ca7e0112e5e94f14 (patch) | |
tree | 5b7d2f798fa775f9581368f667e4c9f27ad8a42c | |
parent | b927b80e1065d8e0a449c91635522f80189cae56 (diff) | |
download | afl++-9dd3e3e38a6f9643a4850099ca7e0112e5e94f14.tar.gz |
fix -M check
-rw-r--r-- | src/afl-fuzz-init.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/afl-fuzz-init.c b/src/afl-fuzz-init.c index 518de8af..1a724bfb 100644 --- a/src/afl-fuzz-init.c +++ b/src/afl-fuzz-init.c @@ -1315,15 +1315,18 @@ dir_cleanup_failed: } -/* If this is a -S slave, ensure a -M master is running */ +/* If this is a -S slave, ensure a -M master is running, if a master is + running when another master is started then warn */ int check_master_exists(afl_state_t *afl) { DIR * sd; struct dirent *sd_ent; u8 * fn; + sd = opendir(afl->sync_dir); - if (!sd) { PFATAL("Unable to open '%s'", afl->sync_dir); } + if (!sd) { return 0; } + while ((sd_ent = readdir(sd))) { /* Skip dot files and our own output directory. */ |