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
This commit is contained in:
van Hauser 2020-06-16 19:36:11 +02:00 committed by GitHub
commit d6824d540b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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))";