aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/afl-fuzz-bitmap.c8
-rw-r--r--src/afl-fuzz-globals.c4
-rw-r--r--src/afl-fuzz-init.c6
-rw-r--r--src/afl-fuzz-run.c6
-rw-r--r--src/afl-fuzz-stats.c18
-rw-r--r--src/afl-fuzz.c8
6 files changed, 25 insertions, 25 deletions
diff --git a/src/afl-fuzz-bitmap.c b/src/afl-fuzz-bitmap.c
index 746fc982..d001dbee 100644
--- a/src/afl-fuzz-bitmap.c
+++ b/src/afl-fuzz-bitmap.c
@@ -683,10 +683,12 @@ u8 save_if_interesting(char** argv, void* mem, u32 len, u8 fault) {
#endif /* ^!SIMPLE_FILES */
++unique_crashes;
-
- if (infoexec) // if the user wants to be informed on new crashes - do that
+
+ if (infoexec) // if the user wants to be informed on new crashes - do
+ // that
if (system(infoexec) == -1)
- hnb += 0; // we dont care if system errors, but we dont want a compiler warning either
+ hnb += 0; // we dont care if system errors, but we dont want a
+ // compiler warning either
last_crash_time = get_cur_time();
last_crash_execs = total_execs;
diff --git a/src/afl-fuzz-globals.c b/src/afl-fuzz-globals.c
index a5ccfdf9..8340394a 100644
--- a/src/afl-fuzz-globals.c
+++ b/src/afl-fuzz-globals.c
@@ -74,8 +74,8 @@ u8 *in_dir, /* Input directory with test cases */
*file_extension, /* File extension */
*orig_cmdline; /* Original command line */
u8 *doc_path, /* Path to documentation dir */
- *infoexec, /* Command to execute on a new crash */
- *out_file; /* File to fuzz, if any */
+ *infoexec, /* Command to execute on a new crash */
+ *out_file; /* File to fuzz, if any */
u32 exec_tmout = EXEC_TIMEOUT; /* Configurable exec timeout (ms) */
u32 hang_tmout = EXEC_TIMEOUT; /* Timeout used for hang det (ms) */
diff --git a/src/afl-fuzz-init.c b/src/afl-fuzz-init.c
index a54c53d8..a37ce8ba 100644
--- a/src/afl-fuzz-init.c
+++ b/src/afl-fuzz-init.c
@@ -138,7 +138,8 @@ void bind_to_free_cpu(void) {
for (i = 0; i < proccount; i++) {
- if (procs[i].ki_oncpu < sizeof(cpu_used) && procs[i].ki_pctcpu > 2) cpu_used[procs[i].ki_oncpu] = 1;
+ if (procs[i].ki_oncpu < sizeof(cpu_used) && procs[i].ki_pctcpu > 2)
+ cpu_used[procs[i].ki_oncpu] = 1;
}
@@ -166,7 +167,8 @@ void bind_to_free_cpu(void) {
for (i = 0; i < proccount; i++) {
- if (procs[i].p_cpuid < sizeof(cpu_used) && procs[i].p_pctcpu > 0) cpu_used[procs[i].p_cpuid] = 1;
+ if (procs[i].p_cpuid < sizeof(cpu_used) && procs[i].p_pctcpu > 0)
+ cpu_used[procs[i].p_cpuid] = 1;
}
diff --git a/src/afl-fuzz-run.c b/src/afl-fuzz-run.c
index fc235b27..5211921f 100644
--- a/src/afl-fuzz-run.c
+++ b/src/afl-fuzz-run.c
@@ -288,8 +288,7 @@ void write_to_testcase(void* mem, u32 len) {
if (out_file) {
- unlink(out_file); /* Ignore errors.
- // */
+ unlink(out_file); /* Ignore errors. */
fd = open(out_file, O_WRONLY | O_CREAT | O_EXCL, 0600);
@@ -331,8 +330,7 @@ void write_with_gap(void* mem, u32 len, u32 skip_at, u32 skip_len) {
if (out_file) {
- unlink(out_file); /* Ignore errors.
- // */
+ unlink(out_file); /* Ignore errors. */
fd = open(out_file, O_WRONLY | O_CREAT | O_EXCL, 0600);
diff --git a/src/afl-fuzz-stats.c b/src/afl-fuzz-stats.c
index f1bc1c8a..7e8639f2 100644
--- a/src/afl-fuzz-stats.c
+++ b/src/afl-fuzz-stats.c
@@ -334,9 +334,9 @@ void show_stats(void) {
/* Lord, forgive me this. */
- SAYF(SET_G1 bSTG bLT bH bSTOP cCYA
+ SAYF(SET_G1 bSTG bLT bH bSTOP cCYA
" process timing " bSTG bH30 bH5 bH bHB bH bSTOP cCYA
- " overall results " bSTG bH2 bH2 bRT "\n");
+ " overall results " bSTG bH2 bH2 bRT "\n");
if (dumb_mode) {
@@ -413,9 +413,9 @@ void show_stats(void) {
" uniq hangs : " cRST "%-6s" bSTG bV "\n",
DTD(cur_ms, last_hang_time), tmp);
- SAYF(bVR bH bSTOP cCYA
+ SAYF(bVR bH bSTOP cCYA
" cycle progress " bSTG bH10 bH5 bH2 bH2 bHB bH bSTOP cCYA
- " map coverage " bSTG bH bHT bH20 bH2 bVL "\n");
+ " map coverage " bSTG bH 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
@@ -443,9 +443,9 @@ void show_stats(void) {
SAYF(bSTOP " count coverage : " cRST "%-21s" bSTG bV "\n", tmp);
- SAYF(bVR bH bSTOP cCYA
+ SAYF(bVR bH bSTOP cCYA
" stage progress " bSTG bH10 bH5 bH2 bH2 bX bH bSTOP cCYA
- " findings in depth " bSTG bH10 bH5 bH2 bH2 bVL "\n");
+ " findings in depth " bSTG bH10 bH5 bH2 bH2 bVL "\n");
sprintf(tmp, "%s (%0.02f%%)", DI(queued_favored),
((double)queued_favored) * 100 / queued_paths);
@@ -514,7 +514,7 @@ void show_stats(void) {
/* Aaaalmost there... hold on! */
- SAYF(bVR bH cCYA bSTOP
+ SAYF(bVR bH cCYA bSTOP
" fuzzing strategy yields " bSTG bH10 bHT bH10 bH5 bHB bH bSTOP cCYA
" path geometry " bSTG bH5 bH2 bVL "\n");
@@ -633,13 +633,13 @@ void show_stats(void) {
sprintf(tmp, "%s/%s", DI(stage_finds[STAGE_CUSTOM_MUTATOR]),
DI(stage_cycles[STAGE_CUSTOM_MUTATOR]));
SAYF(bV bSTOP " custom mut. : " cRST "%-36s " bSTG bVR bH20 bH2 bH bRB
- "\n" bLB bH30 bH20 bH2 bH bRB bSTOP cRST RESET_G1,
+ "\n" bLB bH30 bH20 bH2 bH bRB bSTOP cRST RESET_G1,
tmp);
} else {
SAYF(bV bSTOP " trim : " cRST "%-36s " bSTG bVR bH20 bH2 bH bRB
- "\n" bLB bH30 bH20 bH2 bRB bSTOP cRST RESET_G1,
+ "\n" bLB bH30 bH20 bH2 bRB bSTOP cRST RESET_G1,
tmp);
}
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index 3460f91d..44037ce8 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -76,7 +76,8 @@ static void usage(u8* argv0) {
"Other stuff:\n"
" -T text - text banner to show on the screen\n"
" -M / -S id - distributed mode (see parallel_fuzzing.txt)\n"
- " -I command - execute this command/script when a new crash is found\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 "
"file\n"
" -C - crash exploration mode (the peruvian rabbit thing)\n"
@@ -138,10 +139,7 @@ int main(int argc, char** argv) {
switch (opt) {
- case 'I':
-
- infoexec = optarg;
- break;
+ case 'I': infoexec = optarg; break;
case 's': {