diff options
author | vanhauser-thc <vh@thc.org> | 2021-11-02 19:58:02 +0100 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2021-11-02 19:58:02 +0100 |
commit | f35e71ca11babe72cf0a5c7aa99c9a42aceef5fa (patch) | |
tree | d486182c53328c22c88f60e9958d22ed47c1f22a | |
parent | 01d266f2b4870fbdfd8daba7498ec422fed84c91 (diff) | |
download | afl++-f35e71ca11babe72cf0a5c7aa99c9a42aceef5fa.tar.gz |
fix
-rw-r--r-- | instrumentation/afl-compiler-rt.o.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/instrumentation/afl-compiler-rt.o.c b/instrumentation/afl-compiler-rt.o.c index ff3998e6..694d61c1 100644 --- a/instrumentation/afl-compiler-rt.o.c +++ b/instrumentation/afl-compiler-rt.o.c @@ -2086,7 +2086,7 @@ void __cmplog_rtn_hook(u8 *ptr1, u8 *ptr2) { if ((l1 = area_is_valid(ptr1, 32)) <= 0 || (l2 = area_is_valid(ptr2, 32)) <= 0) return; - int len = MIN(l1, l2); + int len = MIN(31, MIN(l1, l2)); // fprintf(stderr, "RTN2 %u\n", len); uintptr_t k = (uintptr_t)__builtin_return_address(0); @@ -2124,6 +2124,8 @@ void __cmplog_rtn_hook(u8 *ptr1, u8 *ptr2) { } + cmpfn[hits].v0_len = len; + cmpfn[hits].v1_len = len; __builtin_memcpy(cmpfn[hits].v0, ptr1, len); __builtin_memcpy(cmpfn[hits].v1, ptr2, len); // fprintf(stderr, "RTN3\n"); |