about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-06-16 19:36:11 +0200
committerGitHub <noreply@github.com>2020-06-16 19:36:11 +0200
commitd6824d540ba4f88c720aa2fbae07ad4cd2a3864b (patch)
tree34f63e06b415decc64b354647eaf7fe096bc98be
parente5dcaa818e58eaa48c58865ae9f623c5a44989d7 (diff)
parent2e35326040791fa3e320dfe85efda5f8771bdd97 (diff)
downloadafl++-d6824d540ba4f88c720aa2fbae07ad4cd2a3864b.tar.gz
Merge pull request #408 from Minilulatsch/dev
Fixed missing cast in afl-clang-fast.c, which results in a compilation error when using __AFL_FUZZ_TESTCASE_BUF in a C++ target
-rw-r--r--llvm_mode/afl-clang-fast.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm_mode/afl-clang-fast.c b/llvm_mode/afl-clang-fast.c
index 1e71a8d1..6604b57c 100644
--- a/llvm_mode/afl-clang-fast.c
+++ b/llvm_mode/afl-clang-fast.c
@@ -500,7 +500,7 @@ static void edit_params(u32 argc, char **argv, char **envp) {
       "unsigned char *__afl_fuzz_alt_ptr;";
   cc_params[cc_par_cnt++] =
       "-D__AFL_FUZZ_TESTCASE_BUF=(__afl_fuzz_ptr ? __afl_fuzz_ptr : "
-      "(__afl_fuzz_alt_ptr = malloc(1 * 1024 * 1024)))";
+      "(__afl_fuzz_alt_ptr = (unsigned char *) malloc(1 * 1024 * 1024)))";
   cc_params[cc_par_cnt++] =
       "-D__AFL_FUZZ_TESTCASE_LEN=(__afl_fuzz_ptr ? *__afl_fuzz_len : read(0, "
       "__afl_fuzz_alt_ptr, 1 * 1024 * 1024))";