about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2023-09-03 11:25:03 +0200
committervanhauser-thc <vh@thc.org>2023-09-03 11:25:03 +0200
commit3bae404733e27b3ec7769ad6d5d997dcd9ec6fa3 (patch)
tree138240bf08a71b807a249770063bc5bc5c7859b3
parent1c4ff364964f83d98514fa0007683053ed3b64a9 (diff)
downloadafl++-3bae404733e27b3ec7769ad6d5d997dcd9ec6fa3.tar.gz
code format
-rw-r--r--frida_mode/src/instrument/instrument_arm64.c14
-rw-r--r--utils/afl_untracer/afl-untracer.c29
2 files changed, 21 insertions, 22 deletions
diff --git a/frida_mode/src/instrument/instrument_arm64.c b/frida_mode/src/instrument/instrument_arm64.c
index a0c66697..1147275f 100644
--- a/frida_mode/src/instrument/instrument_arm64.c
+++ b/frida_mode/src/instrument/instrument_arm64.c
@@ -402,17 +402,13 @@ bool instrument_write_inline(GumArm64Writer *cw, GumAddress code_addr,
 
   }
 
-  /* 
-   * The mov instruction supports up to a 16-bit offset. If our offset is out of 
-   * range, then it can end up clobbering the op-code portion of the instruction 
-   * rather than just the operands. So return false and fall back to the 
+  /*
+   * The mov instruction supports up to a 16-bit offset. If our offset is out of
+   * range, then it can end up clobbering the op-code portion of the instruction
+   * rather than just the operands. So return false and fall back to the
    * alternative instrumentation.
    */
-  if (area_offset > UINT16_MAX) {
-
-    return false;
-    
-  }
+  if (area_offset > UINT16_MAX) { return false; }
 
   code.code.mov_x0_curr_loc |= area_offset << 5;
 
diff --git a/utils/afl_untracer/afl-untracer.c b/utils/afl_untracer/afl-untracer.c
index 5a67b996..0e3f8a45 100644
--- a/utils/afl_untracer/afl-untracer.c
+++ b/utils/afl_untracer/afl-untracer.c
@@ -54,7 +54,7 @@
 
 #include <sys/mman.h>
 #if !defined(__HAIKU__)
-#include <sys/shm.h>
+  #include <sys/shm.h>
 #endif
 #include <sys/wait.h>
 #include <sys/types.h>
@@ -236,28 +236,31 @@ void read_library_information(void) {
     start += size;
 
   }
+
 #elif defined(__HAIKU__)
   image_info ii;
-  int32 c = 0;
+  int32      c = 0;
 
   while (get_next_image_info(0, &c, &ii) == B_OK) {
 
-      liblist[liblist_cnt].name = (u8 *)strdup(ii.name);
-      liblist[liblist_cnt].addr_start = (u64)ii.text;
-      liblist[liblist_cnt].addr_end = (u64)((char *)ii.text + ii.text_size);
+    liblist[liblist_cnt].name = (u8 *)strdup(ii.name);
+    liblist[liblist_cnt].addr_start = (u64)ii.text;
+    liblist[liblist_cnt].addr_end = (u64)((char *)ii.text + ii.text_size);
 
-      if (debug) {
+    if (debug) {
 
-        fprintf(stderr, "%s:%lx (%lx-%lx)\n", liblist[liblist_cnt].name,
-                (unsigned long)(liblist[liblist_cnt].addr_end -
-                                liblist[liblist_cnt].addr_start),
-                (unsigned long)liblist[liblist_cnt].addr_start,
-                (unsigned long)(liblist[liblist_cnt].addr_end - 1));
+      fprintf(stderr, "%s:%lx (%lx-%lx)\n", liblist[liblist_cnt].name,
+              (unsigned long)(liblist[liblist_cnt].addr_end -
+                              liblist[liblist_cnt].addr_start),
+              (unsigned long)liblist[liblist_cnt].addr_start,
+              (unsigned long)(liblist[liblist_cnt].addr_end - 1));
 
-      }
+    }
+
+    liblist_cnt++;
 
-      liblist_cnt++;
   }
+
 #endif
 
 }