diff options
author | Alexander Shvedov <60114847+a-shvedov@users.noreply.github.com> | 2024-05-30 10:43:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-30 10:43:01 +0300 |
commit | f8a5f1cd9ea907654f42fa06ce6b6bfd4b8c1b13 (patch) | |
tree | 7aec2a095a30ed609ce96f85ec3c4e0a8b8eb74c /utils/aflpp_driver/aflpp_driver.c | |
parent | 629edb1e78d791894ce9ee6d53259f95fe1a29af (diff) | |
parent | e7d871c8bf64962a658e447b90a1a3b43aaddc28 (diff) | |
download | afl++-f8a5f1cd9ea907654f42fa06ce6b6bfd4b8c1b13.tar.gz |
Merge branch 'AFLplusplus:stable' into stable
Diffstat (limited to 'utils/aflpp_driver/aflpp_driver.c')
-rw-r--r-- | utils/aflpp_driver/aflpp_driver.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/utils/aflpp_driver/aflpp_driver.c b/utils/aflpp_driver/aflpp_driver.c index 4e8f466d..9ffb2383 100644 --- a/utils/aflpp_driver/aflpp_driver.c +++ b/utils/aflpp_driver/aflpp_driver.c @@ -279,7 +279,9 @@ __attribute__((weak)) int main(int argc, char **argv) { */ - if (argc < 2 || strncmp(argv[1], "-h", 2) == 0) + if (argc < 2 || strncmp(argv[1], "-h", 2) == 0 || + strcmp(argv[1], "--help") == 0) { + printf( "============================== INFO ================================\n" "This binary is built for afl++.\n" @@ -290,12 +292,21 @@ __attribute__((weak)) int main(int argc, char **argv) { "afl-fuzz will run N iterations before re-spawning the process " "(default: " "INT_MAX)\n" + "You can also use AFL_FUZZER_LOOPCOUNT to set N\n" "For stdin input processing, pass '-' as single command line option.\n" "For file input processing, pass '@@' as single command line option.\n" "To use with afl-cmin or afl-cmin.bash pass '-' as single command line " "option\n" "===================================================================\n", argv[0], argv[0]); + if (argc == 2 && + (strncmp(argv[1], "-h", 2) == 0 || strcmp(argv[1], "--help") == 0)) { + + exit(0); + + } + + } return LLVMFuzzerRunDriver(&argc, &argv, LLVMFuzzerTestOneInput); @@ -369,6 +380,12 @@ __attribute__((weak)) int LLVMFuzzerRunDriver( } + if (getenv("AFL_FUZZER_LOOPCOUNT")) { + + N = atoi(getenv("AFL_FUZZER_LOOPCOUNT")); + + } + assert(N > 0); __afl_manual_init(); |