about summary refs log tree commit diff
path: root/qemu_mode/libqasan/hooks.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2021-03-24 11:25:33 +0100
committerGitHub <noreply@github.com>2021-03-24 11:25:33 +0100
commitf0e08e648609e57732a76e285e57714c6d5fd2cd (patch)
tree9d35021985e2b6ea2b2988f318195d238e6fabc3 /qemu_mode/libqasan/hooks.c
parent37829765282421d9e3cb9448bceedcb58256e76a (diff)
parent2dac4e785fa9f27e8c59bb504cfa8942eba938be (diff)
downloadafl++-f0e08e648609e57732a76e285e57714c6d5fd2cd.tar.gz
Merge pull request #842 from AFLplusplus/stable
3.12c release
Diffstat (limited to 'qemu_mode/libqasan/hooks.c')
-rw-r--r--qemu_mode/libqasan/hooks.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/qemu_mode/libqasan/hooks.c b/qemu_mode/libqasan/hooks.c
index 9c406c74..0e6c3e08 100644
--- a/qemu_mode/libqasan/hooks.c
+++ b/qemu_mode/libqasan/hooks.c
@@ -51,6 +51,7 @@ ssize_t write(int fd, const void *buf, size_t count) {
   void *rtv = __builtin_return_address(0);
 
   QASAN_DEBUG("%14p: write(%d, %p, %zu)\n", rtv, fd, buf, count);
+  QASAN_LOAD(buf, count);
   ssize_t r = __lq_libc_write(fd, buf, count);
   QASAN_DEBUG("\t\t = %zd\n", r);
 
@@ -63,6 +64,7 @@ ssize_t read(int fd, void *buf, size_t count) {
   void *rtv = __builtin_return_address(0);
 
   QASAN_DEBUG("%14p: read(%d, %p, %zu)\n", rtv, fd, buf, count);
+  QASAN_STORE(buf, count);
   ssize_t r = __lq_libc_read(fd, buf, count);
   QASAN_DEBUG("\t\t = %zd\n", r);