diff options
author | vanhauser-thc <vh@thc.org> | 2022-03-01 19:30:17 +0100 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2022-03-01 19:30:17 +0100 |
commit | d84a8da1e9b68f03597f17a9c6c53503551fcb51 (patch) | |
tree | bc766a29685ba56e6b41937353581196d2e70732 /src | |
parent | f70760896c7a5d5f2b286d9ea71c8b6d90e98625 (diff) | |
download | afl++-d84a8da1e9b68f03597f17a9c6c53503551fcb51.tar.gz |
allow for -c0 also for src targets
Diffstat (limited to 'src')
-rw-r--r-- | src/afl-fuzz.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c index c73ab38b..6b177274 100644 --- a/src/afl-fuzz.c +++ b/src/afl-fuzz.c @@ -167,7 +167,8 @@ static void usage(u8 *argv0, int more_help) { " See docs/README.MOpt.md\n" " -c program - enable CmpLog by specifying a binary compiled for " "it.\n" - " if using QEMU, just use -c 0.\n" + " if using QEMU/FRIDA or if you the fuzzing target is compiled" + " for CmpLog then just use -c 0.\n" " -l cmplog_opts - CmpLog configuration values (e.g. \"2AT\"):\n" " 1=small files, 2=larger files (default), 3=all " "files,\n" @@ -1458,6 +1459,12 @@ int main(int argc, char **argv_orig, char **envp) { if (!afl->use_banner) { afl->use_banner = argv[optind]; } + if (afl->shm.cmplog_mode && (!strcmp("-", afl->cmplog_binary) || !strcmp("0", afl->cmplog_binary))) { + + afl->cmplog_binary = argv[optind]; + + } + if (strchr(argv[optind], '/') == NULL && !afl->unicorn_mode) { WARNF(cLRD |