code-format

This commit is contained in:
vanhauser-thc
2021-05-10 13:46:31 +02:00
parent 82d0e4f210
commit 50af4654e3
4 changed files with 13 additions and 14 deletions

View File

@ -312,7 +312,7 @@ u8 trim_case_custom(afl_state_t *afl, struct queue_entry *q, u8 *in_buf,
u32 trim_exec = 0; u32 trim_exec = 0;
u32 orig_len = q->len; u32 orig_len = q->len;
u32 out_len = 0; u32 out_len = 0;
u8* out_buf = NULL; u8 *out_buf = NULL;
u8 val_buf[STRINGIFY_VAL_SIZE_MAX]; u8 val_buf[STRINGIFY_VAL_SIZE_MAX];
@ -475,8 +475,8 @@ u8 trim_case_custom(afl_state_t *afl, struct queue_entry *q, u8 *in_buf,
close(fd); close(fd);
/* Update the queue's knowledge of length as soon as we write the file. /* Update the queue's knowledge of length as soon as we write the file.
We do this here so that exit/error cases that *don't* update the file also We do this here so that exit/error cases that *don't* update the file
don't update q->len. */ also don't update q->len. */
q->len = out_len; q->len = out_len;
memcpy(afl->fsrv.trace_bits, afl->clean_trace_custom, afl->fsrv.map_size); memcpy(afl->fsrv.trace_bits, afl->clean_trace_custom, afl->fsrv.map_size);

View File

@ -193,7 +193,7 @@ void read_afl_environment(afl_state_t *afl, char **envp) {
afl_environment_variable_len)) { afl_environment_variable_len)) {
afl->afl_env.afl_exit_on_time = afl->afl_env.afl_exit_on_time =
(u8 *) get_afl_env(afl_environment_variables[i]); (u8 *)get_afl_env(afl_environment_variables[i]);
} else if (!strncmp(env, "AFL_NO_AFFINITY", } else if (!strncmp(env, "AFL_NO_AFFINITY",

View File

@ -576,11 +576,11 @@ void show_stats(afl_state_t *afl) {
} }
/* AFL_EXIT_ON_TIME. */ /* AFL_EXIT_ON_TIME. */
if (unlikely(afl->last_path_time && !afl->non_instrumented_mode && if (unlikely(afl->last_path_time && !afl->non_instrumented_mode &&
afl->afl_env.afl_exit_on_time && afl->afl_env.afl_exit_on_time &&
(cur_ms - afl->last_path_time) > afl->exit_on_time)) { (cur_ms - afl->last_path_time) > afl->exit_on_time)) {
afl->stop_soon = 2; afl->stop_soon = 2;

View File

@ -298,13 +298,12 @@ int main(int argc, char **argv) {
SAYF( SAYF(
"\n" "\n"
"This is a helper application for afl-clang-lto. It is a wrapper " "This is a helper application for afl-clang-lto.\n"
"around GNU " "It is a wrapper around llvm's 'lld' in case afl-clang-lto cannot be "
"llvm's 'lld',\n" "used.\n"
"executed by the toolchain whenever using " "Note that the target still has to be compiled with -flto=full!\n"
"afl-clang-lto/afl-clang-lto++.\n"
"You probably don't want to run this program directly but rather pass " "You probably don't want to run this program directly but rather pass "
"it as LD parameter to configure scripts\n\n" "it as LD\nparameter to e.g. configure scripts.\n\n"
"Environment variables:\n" "Environment variables:\n"
" AFL_LD_PASSTHROUGH do not link+optimize == no instrumentation\n" " AFL_LD_PASSTHROUGH do not link+optimize == no instrumentation\n"