aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Fioraldi <andreafioraldi@gmail.com>2019-09-13 11:37:26 +0200
committerGitHub <noreply@github.com>2019-09-13 11:37:26 +0200
commit8ee11fecc475dd6bcaab7f1e5a38c1cfac4c7e56 (patch)
treef728ee952e94bb299bd5fc603009fbcd51dd85cb /src
parenta67d86c6e2ca58db81f2ddf6d0a4c837be88271d (diff)
parent36020c41df88ae863fbc2a148765f9c61c7f8bf8 (diff)
downloadafl++-8ee11fecc475dd6bcaab7f1e5a38c1cfac4c7e56.tar.gz
Merge pull request #57 from vanhauser-thc/persistent_qemu
Persistent mode in QEMU
Diffstat (limited to 'src')
-rw-r--r--src/afl-analyze.c2
-rw-r--r--src/afl-forkserver.c2
-rw-r--r--src/afl-fuzz-one.c2
-rw-r--r--src/afl-fuzz-run.c6
-rw-r--r--src/afl-fuzz.c2
-rw-r--r--src/afl-gcc.c8
-rw-r--r--src/afl-gotcpu.c2
-rw-r--r--src/afl-showmap.c2
-rw-r--r--src/afl-tmin.c2
9 files changed, 19 insertions, 9 deletions
diff --git a/src/afl-analyze.c b/src/afl-analyze.c
index e30f53b8..4b157973 100644
--- a/src/afl-analyze.c
+++ b/src/afl-analyze.c
@@ -988,7 +988,7 @@ int main(int argc, char** argv) {
unicorn_mode = 1;
break;
-
+
case 'h':
usage(argv[0]);
return -1;
diff --git a/src/afl-forkserver.c b/src/afl-forkserver.c
index 6c27d0f9..d9f67da5 100644
--- a/src/afl-forkserver.c
+++ b/src/afl-forkserver.c
@@ -44,7 +44,7 @@
extern u8 uses_asan;
extern u8 *trace_bits;
extern s32 forksrv_pid, child_pid, fsrv_ctl_fd, fsrv_st_fd;
-extern s32 out_fd, out_dir_fd, dev_null_fd; /* initialize these with -1 */
+extern s32 out_fd, out_dir_fd, dev_null_fd; /* initialize these with -1 */
#ifndef HAVE_ARC4RANDOM
extern s32 dev_urandom_fd;
#endif
diff --git a/src/afl-fuzz-one.c b/src/afl-fuzz-one.c
index 2a437ddd..3928a88f 100644
--- a/src/afl-fuzz-one.c
+++ b/src/afl-fuzz-one.c
@@ -2288,6 +2288,7 @@ abandon_entry:
}
struct MOpt_globals_t {
+
u64 *finds;
u64 *finds_v2;
u64 *cycles;
@@ -2300,6 +2301,7 @@ struct MOpt_globals_t {
char *splice_stageformat;
char *havoc_stagenameshort;
char *splice_stagenameshort;
+
} MOpt_globals_pilot = {
stage_finds_puppet[0],
stage_finds_puppet_v2[0],
diff --git a/src/afl-fuzz-run.c b/src/afl-fuzz-run.c
index 37a04e44..f2f663dc 100644
--- a/src/afl-fuzz-run.c
+++ b/src/afl-fuzz-run.c
@@ -253,7 +253,8 @@ 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_TRUNC, 0600);
@@ -295,7 +296,8 @@ 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_TRUNC, 0600);
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index eb0060a4..2d16345a 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -493,7 +493,7 @@ int main(int argc, char** argv) {
case 'h':
usage(argv[0]);
return -1;
- break; // not needed
+ break; // not needed
default: usage(argv[0]);
diff --git a/src/afl-gcc.c b/src/afl-gcc.c
index 2f72ef34..8982ca97 100644
--- a/src/afl-gcc.c
+++ b/src/afl-gcc.c
@@ -334,11 +334,15 @@ static void edit_params(u32 argc, char** argv) {
int main(int argc, char** argv) {
if (argc == 2 && strcmp(argv[1], "-h") == 0) {
- printf("afl-cc" VERSION" by <lcamtuf@google.com>\n\n");
+
+ printf("afl-cc" VERSION " by <lcamtuf@google.com>\n\n");
printf("%s \n\n", argv[0]);
printf("afl-gcc has no command line options\n");
- printf("NOTE: afl-gcc is deprecated, llvm_mode is much faster and has more options\n");
+ printf(
+ "NOTE: afl-gcc is deprecated, llvm_mode is much faster and has more "
+ "options\n");
return -1;
+
}
if (isatty(2) && !getenv("AFL_QUIET")) {
diff --git a/src/afl-gotcpu.c b/src/afl-gotcpu.c
index 85864c6f..de41177c 100644
--- a/src/afl-gotcpu.c
+++ b/src/afl-gotcpu.c
@@ -128,11 +128,13 @@ repeat_loop:
int main(int argc, char** argv) {
if (argc > 1) {
+
printf("afl-gotcpu" VERSION " by <lcamtuf@google.com>\n");
printf("\n%s \n\n", argv[0]);
printf("afl-gotcpu does not have command line options\n");
printf("afl-gotcpu prints out which CPUs are available\n");
return -1;
+
}
#ifdef HAVE_AFFINITY
diff --git a/src/afl-showmap.c b/src/afl-showmap.c
index 6aa72746..bf9306d5 100644
--- a/src/afl-showmap.c
+++ b/src/afl-showmap.c
@@ -691,7 +691,7 @@ int main(int argc, char** argv) {
if (edges_only) FATAL("-e and -r are mutually exclusive");
raw_instr_output = 1;
break;
-
+
case 'h':
usage(argv[0]);
return -1;
diff --git a/src/afl-tmin.c b/src/afl-tmin.c
index baf22557..8308d98d 100644
--- a/src/afl-tmin.c
+++ b/src/afl-tmin.c
@@ -1211,7 +1211,7 @@ int main(int argc, char** argv) {
mask_bitmap = ck_alloc(MAP_SIZE);
read_bitmap(optarg);
break;
-
+
case 'h':
usage(argv[0]);
return -1;