fix errors in last commit (u8)afl_get_env
MODIFY
include/afl-fuzz.h
include/afl-fuzz.h
@@ -304,12 +304,10 @@ extern char *power_names[POWER_SCHEDULES_NUM];
typedef struct afl_env_vars {
- u8 afl_skip_cpufreq, afl_exit_when_done, afl_no_affinity,
- afl_skip_bin_check, afl_dumb_forksrv,
- afl_import_first, afl_custom_mutator_only,
- afl_no_ui, afl_force_ui, afl_i_dont_care_about_missing_crashes,
- afl_bench_just_one, afl_bench_until_crash, afl_debug_child_output,
- afl_autoresume;
+ u8 afl_skip_cpufreq, afl_exit_when_done, afl_no_affinity, afl_skip_bin_check,
+ afl_dumb_forksrv, afl_import_first, afl_custom_mutator_only, afl_no_ui,
+ afl_force_ui, afl_i_dont_care_about_missing_crashes, afl_bench_just_one,
+ afl_bench_until_crash, afl_debug_child_output, afl_autoresume;
u8 *afl_tmpdir, *afl_post_library, *afl_custom_mutator_library,
*afl_python_module, *afl_path, *afl_hang_tmout, *afl_skip_crashes,

MODIFY
include/envs.h
include/envs.h
extern char *afl_environment_variables[];
+

MODIFY
src/afl-fuzz-globals.c
src/afl-fuzz-globals.c
@@ -147,98 +147,98 @@ void read_afl_environment(afl_state_t *afl, char **envp) {
if (strncmp(env, "AFL_SKIP_CPUFREQ",
strlen(afl_environment_variables[i]) == 0)) {
- afl->afl_env.afl_skip_cpufreq = (u8)get_afl_env(env);
+ afl->afl_env.afl_skip_cpufreq = get_afl_env(env) ? 1 : 0;
} else if (!strncmp(env, "AFL_EXIT_WHEN_DONE",
strlen(afl_environment_variables[i]))) {
- afl->afl_env.afl_exit_when_done = (u8)get_afl_env(env);
+ afl->afl_env.afl_exit_when_done = get_afl_env(env) ? 1 : 0;
} else if (!strncmp(env, "AFL_NO_AFFINITY",
strlen(afl_environment_variables[i]))) {
- afl->afl_env.afl_no_affinity = (u8)get_afl_env(env);
+ afl->afl_env.afl_no_affinity = get_afl_env(env) ? 1 : 0;
} else if (!strncmp(env, "AFL_SKIP_CRASHES",
strlen(afl_environment_variables[i]))) {
- afl->afl_env.afl_skip_crashes = (u8)get_afl_env(env);
+ afl->afl_env.afl_skip_crashes = (u8 *)get_afl_env(env);
} else if (!strncmp(env, "AFL_HANG_TMOUT",
strlen(afl_environment_variables[i]))) {
- afl->afl_env.afl_hang_tmout = (u8)get_afl_env(env);
+ afl->afl_env.afl_hang_tmout = (u8 *)get_afl_env(env);
} else if (!strncmp(env, "AFL_SKIP_BIN_CHECK",
strlen(afl_environment_variables[i]))) {
- afl->afl_env.afl_skip_bin_check = (u8)get_afl_env(env);
+ afl->afl_env.afl_skip_bin_check = get_afl_env(env) ? 1 : 0;
} else if (!strncmp(env, "AFL_DUMB_FORKSRV",
strlen(afl_environment_variables[i]))) {
- afl->afl_env.afl_dumb_forksrv = (u8)get_afl_env(env);
+ afl->afl_env.afl_dumb_forksrv = get_afl_env(env) ? 1 : 0;
} else if (!strncmp(env, "AFL_IMPORT_FIRST",
strlen(afl_environment_variables[i]))) {
- afl->afl_env.afl_import_first = (u8)get_afl_env(env);
+ afl->afl_env.afl_import_first = get_afl_env(env) ? 1 : 0;
} else if (!strncmp(env, "AFL_CUSTOM_MUTATOR_ONLY",
strlen(afl_environment_variables[i]))) {
- afl->afl_env.afl_custom_mutator_only = (u8)get_afl_env(env);
+ afl->afl_env.afl_custom_mutator_only = get_afl_env(env) ? 1 : 0;
} else if (!strncmp(env, "AFL_NO_UI",
strlen(afl_environment_variables[i]))) {
- afl->afl_env.afl_no_ui = (u8)get_afl_env(env);
+ afl->afl_env.afl_no_ui = get_afl_env(env) ? 1 : 0;
} else if (!strncmp(env, "AFL_FORCE_UI",
strlen(afl_environment_variables[i]))) {
- afl->afl_env.afl_force_ui = (u8)get_afl_env(env);
+ afl->afl_env.afl_force_ui = get_afl_env(env) ? 1 : 0;
} else if (!strncmp(env, "AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES",
strlen(afl_environment_variables[i]))) {
afl->afl_env.afl_i_dont_care_about_missing_crashes =
- (u8)get_afl_env(env);
+ get_afl_env(env) ? 1 : 0;
} else if (!strncmp(env, "AFL_BENCH_JUST_ONE",
strlen(afl_environment_variables[i]))) {
- afl->afl_env.afl_bench_just_one = (u8)get_afl_env(env);
+ afl->afl_env.afl_bench_just_one = get_afl_env(env) ? 1 : 0;
} else if (!strncmp(env, "AFL_BENCH_UNTIL_CRASH",
strlen(afl_environment_variables[i]))) {
- afl->afl_env.afl_bench_until_crash = (u8)get_afl_env(env);
+ afl->afl_env.afl_bench_until_crash = get_afl_env(env) ? 1 : 0;
} else if (!strncmp(env, "AFL_DEBUG_CHILD_OUTPUT",
strlen(afl_environment_variables[i]))) {
- afl->afl_env.afl_debug_child_output = (u8)get_afl_env(env);
+ afl->afl_env.afl_debug_child_output = get_afl_env(env) ? 1 : 0;
} else if (!strncmp(env, "AFL_AUTORESUME",
strlen(afl_environment_variables[i]))) {
- afl->afl_env.afl_autoresume = (u8)get_afl_env(env);
+ afl->afl_env.afl_autoresume = get_afl_env(env) ? 1 : 0;
} else if (!strncmp(env, "AFL_TMPDIR",

MODIFY
src/afl-fuzz.c
src/afl-fuzz.c
@@ -139,7 +139,7 @@ static void usage(afl_state_t *afl, u8 *argv0, int more_help) {
"Other stuff:\n"
" -T text - text banner to show on the screen\n"
- " -M / -S id - distributed mode (see parallel_fuzzing.md)\n"
+ " -M / -S id - distributed mode (see docs/parallel_fuzzing.md)\n"
" -I command - execute this command/script when a new crash is "
"found\n"
" -B bitmap.txt - mutate a specific test case, use the out/fuzz_bitmap "

fix errors in last commit (u8)afl_get_env