aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2021-06-07 09:26:53 +0200
committervanhauser-thc <vh@thc.org>2021-06-07 09:26:53 +0200
commit92fcef4520fe65fc641fd2e8d86a7c17845031c0 (patch)
tree1e890952e3598905e18de172777ff4842dcf7cf2 /src
parenta5ff9f1bebfc974a774bba896e51e18288f66c68 (diff)
downloadafl++-92fcef4520fe65fc641fd2e8d86a7c17845031c0.tar.gz
write target errors to out_dir/error.txt
Diffstat (limited to 'src')
-rw-r--r--src/afl-analyze.c2
-rw-r--r--src/afl-fuzz-stats.c7
-rw-r--r--src/afl-fuzz.c2
3 files changed, 5 insertions, 6 deletions
diff --git a/src/afl-analyze.c b/src/afl-analyze.c
index 5d5c4b8c..d43278b9 100644
--- a/src/afl-analyze.c
+++ b/src/afl-analyze.c
@@ -225,7 +225,6 @@ static s32 write_to_file(u8 *path, u8 *mem, u32 len) {
}
-
/* Handle timeout signal. */
static void handle_timeout(int sig) {
@@ -238,7 +237,6 @@ static void handle_timeout(int sig) {
}
-
/* Execute target application. Returns exec checksum, or 0 if program
times out. */
diff --git a/src/afl-fuzz-stats.c b/src/afl-fuzz-stats.c
index 89d2c37d..9648d795 100644
--- a/src/afl-fuzz-stats.c
+++ b/src/afl-fuzz-stats.c
@@ -768,7 +768,7 @@ void show_stats(afl_state_t *afl) {
SAYF(bVR bH bSTOP cCYA
" cycle progress " bSTG bH10 bH5 bH2 bH2 bH2 bHB bH bSTOP cCYA
- " map coverage" bSTG bHT bH20 bH2 bVL "\n");
+ " map coverage" bSTG bHT bH20 bH2 bVL "\n");
/* This gets funny because we want to print several variable-length variables
together, but then cram them into a fixed-width field - so we need to
@@ -873,9 +873,8 @@ void show_stats(afl_state_t *afl) {
/* Aaaalmost there... hold on! */
- SAYF(bVR bH cCYA bSTOP
- " fuzzing strategy yields " bSTG bH10 bH2 bHT bH10 bH2 bH bHB bH bSTOP cCYA
- " path geometry " bSTG bH5 bH2 bVL "\n");
+ SAYF(bVR bH cCYA bSTOP " fuzzing strategy yields " bSTG bH10 bH2 bHT bH10 bH2
+ bH bHB bH bSTOP cCYA " path geometry " bSTG bH5 bH2 bVL "\n");
if (unlikely(afl->custom_only)) {
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index dc594b30..9a3780fb 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -1205,6 +1205,8 @@ int main(int argc, char **argv_orig, char **envp) {
}
+ setenv("__AFL_OUT_DIR", afl->out_dir, 1);
+
if (get_afl_env("AFL_DISABLE_TRIM")) { afl->disable_trim = 1; }
if (getenv("AFL_NO_UI") && getenv("AFL_FORCE_UI")) {