From f35e71ca11babe72cf0a5c7aa99c9a42aceef5fa Mon Sep 17 00:00:00 2001 From: vanhauser-thc Date: Tue, 2 Nov 2021 19:58:02 +0100 Subject: fix --- instrumentation/afl-compiler-rt.o.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'instrumentation/afl-compiler-rt.o.c') 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"); -- cgit 1.4.1