aboutsummaryrefslogtreecommitdiff
path: root/unicorn_mode
diff options
context:
space:
mode:
authorDominik Maier <domenukk@gmail.com>2019-08-29 03:06:24 +0200
committerDominik Maier <domenukk@gmail.com>2019-08-29 03:06:24 +0200
commit3f2a317af09982a47340593b224a10b79a81d303 (patch)
tree93ebe17accbe0d64edfb62f08b8ac846d5a72b81 /unicorn_mode
parent892513708bb5f68b15610fe0c74b892d4421c8cd (diff)
downloadAFLplusplus-3f2a317af09982a47340593b224a10b79a81d303.tar.gz
Fixed SIGSEV due to wrong pointer size
Diffstat (limited to 'unicorn_mode')
-rw-r--r--unicorn_mode/patches/afl-unicorn-cpu-inl.h2
-rw-r--r--unicorn_mode/patches/afl-unicorn-tcg-runtime-inl.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/unicorn_mode/patches/afl-unicorn-cpu-inl.h b/unicorn_mode/patches/afl-unicorn-cpu-inl.h
index 187a0ce6..ff194696 100644
--- a/unicorn_mode/patches/afl-unicorn-cpu-inl.h
+++ b/unicorn_mode/patches/afl-unicorn-cpu-inl.h
@@ -252,7 +252,7 @@ static inline void afl_maybe_log(struct uc_struct* uc, unsigned long cur_loc) {
#if (defined(__x86_64__) || defined(__i386__)) && defined(AFL_QEMU_NOT_ZERO)
asm volatile (
"incb (%0, %1, 1)\n"
- "adc $0, (%0, %1, 1)\n"
+ "adcb $0, (%0, %1, 1)\n"
: /* no out */
: "r" (uc->afl_area_ptr), "r" (afl_idx)
: "memory", "eax"
diff --git a/unicorn_mode/patches/afl-unicorn-tcg-runtime-inl.h b/unicorn_mode/patches/afl-unicorn-tcg-runtime-inl.h
index e59d7b15..52cc1afb 100644
--- a/unicorn_mode/patches/afl-unicorn-tcg-runtime-inl.h
+++ b/unicorn_mode/patches/afl-unicorn-tcg-runtime-inl.h
@@ -36,7 +36,7 @@
# define INC_AFL_AREA(loc) \
asm volatile ( \
"incb (%0, %1, 1)\n" \
- "adc $0, (%0, %1, 1)\n" \
+ "adcb $0, (%0, %1, 1)\n" \
: /* no out */ \
: "r" (uc->afl_area_ptr), "r" (loc) \
: "memory", "eax" \