about summary refs log tree commit diff
path: root/src/afl-cc.c
diff options
context:
space:
mode:
authorAndrea Fioraldi <andreafioraldi@gmail.com>2021-01-02 11:36:17 +0100
committerAndrea Fioraldi <andreafioraldi@gmail.com>2021-01-02 11:36:17 +0100
commit7620f6f39672a4dc799d3875a2c6f7a0d1f0b815 (patch)
treee93d3c9c8639020f1c24fe82dedcc2c863f06ccc /src/afl-cc.c
parent214da5c42e639fb5993c9bc2ca1f48f6a8b2c9c7 (diff)
parent697e3e285bdfc3848dfeafcec7345301cb3dc64e (diff)
downloadafl++-7620f6f39672a4dc799d3875a2c6f7a0d1f0b815.tar.gz
Merge branch 'dev' of github.com:AFLplusplus/AFLplusplus into dev
Diffstat (limited to 'src/afl-cc.c')
-rw-r--r--src/afl-cc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/afl-cc.c b/src/afl-cc.c
index 66f4860f..e6a6718e 100644
--- a/src/afl-cc.c
+++ b/src/afl-cc.c
@@ -879,7 +879,7 @@ static void edit_params(u32 argc, char **argv, char **envp) {
 
 #ifndef __ANDROID__
 
-  if (compiler_mode != GCC) {
+  if (compiler_mode != GCC && compiler_mode != CLANG) {
 
     switch (bit_mode) {
 
@@ -1030,9 +1030,9 @@ int main(int argc, char **argv, char **envp) {
 
     compiler_mode = GCC;
 
-  } else if (strncmp(callname, "afl-clang", 9) == 0 &&
+  } else if (strcmp(callname, "afl-clang") == 0 ||
 
-             strstr(callname, "fast") == NULL) {
+             strcmp(callname, "afl-clang++") == 0) {
 
     compiler_mode = CLANG;
 
@@ -1076,13 +1076,13 @@ int main(int argc, char **argv, char **envp) {
 
   }
 
-  if (strncmp(callname, "afl-clang", 9) == 0 &&
-      strstr(callname, "fast") == NULL) {
+  if (strcmp(callname, "afl-clang") == 0 ||
+      strcmp(callname, "afl-clang++") == 0) {
 
     clang_mode = 1;
     compiler_mode = CLANG;
 
-    if (strncmp(callname, "afl-clang++", 11) == 0) { plusplus_mode = 1; }
+    if (strcmp(callname, "afl-clang++") == 0) { plusplus_mode = 1; }
 
   }
 
@@ -1364,17 +1364,17 @@ int main(int argc, char **argv, char **envp) {
 
     if (clang_mode) {
 
-      instrument_mode = CLANG;
+      instrument_mode = INSTRUMENT_CLANG;
 
     } else {
 
-      instrument_mode = GCC;
+      instrument_mode = INSTRUMENT_GCC;
 
     }
 
   }
 
-  if (compiler_mode == CLANG) { instrument_mode = CLANG; }
+  if (compiler_mode == CLANG) { instrument_mode = INSTRUMENT_CLANG; }
 
   if (argc < 2 || strncmp(argv[1], "-h", 2) == 0) {