diff options
author | van Hauser <vh@thc.org> | 2020-09-03 09:59:23 +0200 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-09-03 09:59:23 +0200 |
commit | 4c48d3a3ad1c0c8199b40ef47517b8a736cd5579 (patch) | |
tree | b9ac886ec6d18d9a6a371595bf66e78fd4f45d2e /src | |
parent | 020b8a49648ec5f58f44dc104f3a3c83624a41d1 (diff) | |
download | afl++-4c48d3a3ad1c0c8199b40ef47517b8a736cd5579.tar.gz |
update xxh3 to 0.8.0, fix is_ascii
Diffstat (limited to 'src')
-rw-r--r-- | src/afl-fuzz-queue.c | 6 | ||||
-rw-r--r-- | src/afl-performance.c | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/afl-fuzz-queue.c b/src/afl-fuzz-queue.c index 0c472845..c6d8225f 100644 --- a/src/afl-fuzz-queue.c +++ b/src/afl-fuzz-queue.c @@ -138,9 +138,9 @@ static u8 check_if_text(struct queue_entry *q) { } // non-overlong 2-byte - if (((0xC2 <= buf[offset + 0] && buf[offset + 0] <= 0xDF) && - (0x80 <= buf[offset + 1] && buf[offset + 1] <= 0xBF)) && - len - offset > 1) { + if (len - offset > 1 && + ((0xC2 <= buf[offset + 0] && buf[offset + 0] <= 0xDF) && + (0x80 <= buf[offset + 1] && buf[offset + 1] <= 0xBF))) { offset += 2; utf8++; diff --git a/src/afl-performance.c b/src/afl-performance.c index a9d7cefa..7a80ac4b 100644 --- a/src/afl-performance.c +++ b/src/afl-performance.c @@ -22,7 +22,10 @@ #include <stdint.h> #include "afl-fuzz.h" #include "types.h" -#include "xxh3.h" + +#define XXH_INLINE_ALL +#include "xxhash.h" +#undef XXH_INLINE_ALL /* we use xoshiro256** instead of rand/random because it is 10x faster and has better randomness properties. */ |