diff options
author | van Hauser <vh@thc.org> | 2021-01-06 09:35:47 +0100 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2021-01-06 09:35:47 +0100 |
commit | 52c221fc484317d2cd3926ae31ac891bad8cc93a (patch) | |
tree | c405d2b9d06c5b56d0cae6dd90eed994551cc087 /instrumentation | |
parent | 4c78bb70802a85ffad6aee0f234f26901cd563f9 (diff) | |
download | AFLplusplus-52c221fc484317d2cd3926ae31ac891bad8cc93a.tar.gz |
selective coverage fix
Diffstat (limited to 'instrumentation')
-rw-r--r-- | instrumentation/afl-compiler-rt.o.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/instrumentation/afl-compiler-rt.o.c b/instrumentation/afl-compiler-rt.o.c index bb62fb38..add303d7 100644 --- a/instrumentation/afl-compiler-rt.o.c +++ b/instrumentation/afl-compiler-rt.o.c @@ -1435,19 +1435,15 @@ void __afl_coverage_abort() { } // mark this area as especially interesting -void __afl_coverage_interesting(u32 id, u8 val) { +void __afl_coverage_interesting(u8 val, u32 id) { - if (val) { + if (id) { __afl_area_ptr[id] = val; } else { - do { - - __afl_area_ptr[id] = (u8)rand(); - - } while (!__afl_area_ptr[id]); + __afl_area_ptr[(rand() % __afl_map_size)] = val; } |