diff options
-rw-r--r-- | frida_mode/src/instrument/instrument_arm64.c | 14 | ||||
-rw-r--r-- | utils/afl_untracer/afl-untracer.c | 29 |
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 } |