about summary refs log tree commit diff
path: root/examples/afl_untracer/afl-untracer.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-07-13 17:57:02 +0200
committervan Hauser <vh@thc.org>2020-07-13 17:57:02 +0200
commit4d929f80fbf22eeb09612a575bcd1a4141b9a8a9 (patch)
treecec725521990808bb9888a01151733d0b7b49aed /examples/afl_untracer/afl-untracer.c
parent6b79e1f76dee1dc5775b1e10edfa5b2180f553f8 (diff)
downloadafl++-4d929f80fbf22eeb09612a575bcd1a4141b9a8a9.tar.gz
fix for laf intel float split not enabled if not not on a tty
Diffstat (limited to 'examples/afl_untracer/afl-untracer.c')
-rw-r--r--examples/afl_untracer/afl-untracer.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/examples/afl_untracer/afl-untracer.c b/examples/afl_untracer/afl-untracer.c
index dc2cd378..68658bfd 100644
--- a/examples/afl_untracer/afl-untracer.c
+++ b/examples/afl_untracer/afl-untracer.c
@@ -74,6 +74,9 @@
 
 // STEP 1:
 
+/* here you need to specify the parameter for the target function */
+static void *(*o_function)(u8 *buf, int len);
+
 /* use stdin (1) or a file on the commandline (0) */
 static u32 use_stdin = 1;
 
@@ -668,13 +671,10 @@ static void sigtrap_handler(int signum, siginfo_t *si, void *context) {
 
 }
 
-/* here you need to specify the parameter for the target function */
-static void *(*o_function)(u8 *buf, int len);
-
 /* the MAIN function */
 int main(int argc, char *argv[]) {
 
-  (void) personality(ADDR_NO_RANDOMIZE); // disable ASLR
+  (void)personality(ADDR_NO_RANDOMIZE);  // disable ASLR
 
   pid = getpid();
   if (getenv("AFL_DEBUG")) debug = 1;
@@ -745,9 +745,10 @@ int main(int argc, char *argv[]) {
 }
 
 #ifndef _DEBUG
-inline 
+inline
 #endif
-static void fuzz() {
+    static void
+    fuzz() {
 
   // STEP 3: call the function to fuzz, also the functions you might
   //         need to call to prepare the function and - important! -
@@ -762,3 +763,4 @@ static void fuzz() {
   // END STEP 3
 
 }
+