about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2021-05-10 13:46:31 +0200
committervanhauser-thc <vh@thc.org>2021-05-10 13:46:31 +0200
commit50af4654e314df75ba8653340e5a58e9e42f1f19 (patch)
tree7d9242440506351325693d656097d9fd05ace952 /src
parent82d0e4f210ba6dd12eb4e09cbb144850660e050b (diff)
downloadafl++-50af4654e314df75ba8653340e5a58e9e42f1f19.tar.gz
code-format
Diffstat (limited to 'src')
-rw-r--r--src/afl-fuzz-mutators.c6
-rw-r--r--src/afl-fuzz-state.c2
-rw-r--r--src/afl-fuzz-stats.c8
-rw-r--r--src/afl-ld-lto.c11
4 files changed, 13 insertions, 14 deletions
diff --git a/src/afl-fuzz-mutators.c b/src/afl-fuzz-mutators.c
index 3bb37a89..e27d6fae 100644
--- a/src/afl-fuzz-mutators.c
+++ b/src/afl-fuzz-mutators.c
@@ -312,7 +312,7 @@ u8 trim_case_custom(afl_state_t *afl, struct queue_entry *q, u8 *in_buf,
   u32 trim_exec = 0;
   u32 orig_len = q->len;
   u32 out_len = 0;
-  u8* out_buf = NULL;
+  u8 *out_buf = NULL;
 
   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);
 
     /* 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
-       don't update q->len. */
+       We do this here so that exit/error cases that *don't* update the file
+       also don't update q->len. */
     q->len = out_len;
 
     memcpy(afl->fsrv.trace_bits, afl->clean_trace_custom, afl->fsrv.map_size);
diff --git a/src/afl-fuzz-state.c b/src/afl-fuzz-state.c
index 73ba7a52..c886cb28 100644
--- a/src/afl-fuzz-state.c
+++ b/src/afl-fuzz-state.c
@@ -193,7 +193,7 @@ void read_afl_environment(afl_state_t *afl, char **envp) {
                               afl_environment_variable_len)) {
 
             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",
 
diff --git a/src/afl-fuzz-stats.c b/src/afl-fuzz-stats.c
index 2dea1bcb..313263f9 100644
--- a/src/afl-fuzz-stats.c
+++ b/src/afl-fuzz-stats.c
@@ -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 && 
-    afl->afl_env.afl_exit_on_time && 
-    (cur_ms - afl->last_path_time) > afl->exit_on_time)) {
+  if (unlikely(afl->last_path_time && !afl->non_instrumented_mode &&
+               afl->afl_env.afl_exit_on_time &&
+               (cur_ms - afl->last_path_time) > afl->exit_on_time)) {
 
     afl->stop_soon = 2;
 
diff --git a/src/afl-ld-lto.c b/src/afl-ld-lto.c
index d0113af9..1ce97649 100644
--- a/src/afl-ld-lto.c
+++ b/src/afl-ld-lto.c
@@ -298,13 +298,12 @@ int main(int argc, char **argv) {
 
     SAYF(
         "\n"
-        "This is a helper application for afl-clang-lto. It is a wrapper "
-        "around GNU "
-        "llvm's 'lld',\n"
-        "executed by the toolchain whenever using "
-        "afl-clang-lto/afl-clang-lto++.\n"
+        "This is a helper application for afl-clang-lto.\n"
+        "It is a wrapper around llvm's 'lld' in case afl-clang-lto cannot be "
+        "used.\n"
+        "Note that the target still has to be compiled with -flto=full!\n"
         "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"
         "  AFL_LD_PASSTHROUGH   do not link+optimize == no instrumentation\n"