diff options
author | Andrea Fioraldi <andreafioraldi@gmail.com> | 2019-10-31 16:19:26 +0100 |
---|---|---|
committer | Andrea Fioraldi <andreafioraldi@gmail.com> | 2019-10-31 16:19:26 +0100 |
commit | 58fe2f2c767b4dfe973b75feaf7df78c798b62d5 (patch) | |
tree | 9c00033f34783b1f184641a2ae47734c2b542913 /gcc_plugin | |
parent | 664f603a31ff7b118d14fa6409dd662ee604b36c (diff) | |
parent | b17afc10a23cf87b3a0b8290491de4edd80c9c71 (diff) | |
download | afl++-58fe2f2c767b4dfe973b75feaf7df78c798b62d5.tar.gz |
Merge branch 'master' of github.com:vanhauser-thc/AFLplusplus
Diffstat (limited to 'gcc_plugin')
-rw-r--r-- | gcc_plugin/afl-gcc-fast.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/gcc_plugin/afl-gcc-fast.c b/gcc_plugin/afl-gcc-fast.c index 093249a0..057b44cc 100644 --- a/gcc_plugin/afl-gcc-fast.c +++ b/gcc_plugin/afl-gcc-fast.c @@ -108,7 +108,7 @@ static void edit_params(u32 argc, char** argv) { u8 fortify_set = 0, asan_set = 0, x_set = 0, maybe_linking = 1; u8* name; - cc_params = ck_alloc((argc + 64) * sizeof(u8*)); + cc_params = ck_alloc((argc + 128) * sizeof(u8*)); name = strrchr(argv[0], '/'); if (!name) @@ -202,6 +202,19 @@ static void edit_params(u32 argc, char** argv) { } + if (getenv("AFL_NO_BUILTIN")) { + + cc_params[cc_par_cnt++] = "-fno-builtin-strcmp"; + cc_params[cc_par_cnt++] = "-fno-builtin-strncmp"; + cc_params[cc_par_cnt++] = "-fno-builtin-strcasecmp"; + cc_params[cc_par_cnt++] = "-fno-builtin-strncasecmp"; + cc_params[cc_par_cnt++] = "-fno-builtin-memcmp"; + cc_params[cc_par_cnt++] = "-fno-builtin-bcmp"; + cc_params[cc_par_cnt++] = "-fno-builtin-strstr"; + cc_params[cc_par_cnt++] = "-fno-builtin-strcasestr"; + + } + #ifdef USEMMAP cc_params[cc_par_cnt++] = "-lrt"; #endif |