diff options
author | van Hauser <vh@thc.org> | 2021-12-16 12:40:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-16 12:40:35 +0100 |
commit | 74a8f145e09d0361d8f576eb3f2e8881b6116f18 (patch) | |
tree | 42a51b12f3a018e729cca0826feccd49f5536e2e /src/afl-cc.c | |
parent | 02fba1cc7e8709c8e0961454136a64f373e4f9ff (diff) | |
parent | 3cb7319ccdb98dcc6b023dbead603a4450ac4541 (diff) | |
download | afl++-74a8f145e09d0361d8f576eb3f2e8881b6116f18.tar.gz |
Merge pull request #1219 from AFLplusplus/dev
push to stable
Diffstat (limited to 'src/afl-cc.c')
-rw-r--r-- | src/afl-cc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/afl-cc.c b/src/afl-cc.c index cafb8e32..442cf265 100644 --- a/src/afl-cc.c +++ b/src/afl-cc.c @@ -695,7 +695,7 @@ static void edit_params(u32 argc, char **argv, char **envp) { /* Detect stray -v calls from ./configure scripts. */ - u8 skip_next = 0; + u8 skip_next = 0, non_dash = 0; while (--argc) { u8 *cur = *(++argv); @@ -707,6 +707,7 @@ static void edit_params(u32 argc, char **argv, char **envp) { } + if (cur[0] != '-') { non_dash = 1; } if (!strncmp(cur, "--afl", 5)) continue; if (lto_mode && !strncmp(cur, "-fuse-ld=", 9)) continue; if (lto_mode && !strncmp(cur, "--ld-path=", 10)) continue; @@ -1025,7 +1026,7 @@ static void edit_params(u32 argc, char **argv, char **envp) { } - if (preprocessor_only || have_c) { + if (preprocessor_only || have_c || !non_dash) { /* In the preprocessor_only case (-E), we are not actually compiling at all but requesting the compiler to output preprocessed sources only. |