diff options
author | van Hauser <vh@thc.org> | 2021-09-01 08:41:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-01 08:41:21 +0200 |
commit | 773baf9391ff5f1793deb7968366819e7fa07adc (patch) | |
tree | 08fcc9ebc0a70f545cbc149385dfb9a4670eada8 /src | |
parent | 353d402aaf9296c7dbd47e66fbbc6e59179c4e44 (diff) | |
parent | d4a8a9df699aa018755f4948e2add508be44b8b2 (diff) | |
download | afl++-773baf9391ff5f1793deb7968366819e7fa07adc.tar.gz |
Merge pull request #1084 from AFLplusplus/dev
push to stable
Diffstat (limited to 'src')
-rw-r--r-- | src/afl-fuzz-bitmap.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/afl-fuzz-bitmap.c b/src/afl-fuzz-bitmap.c index 59b1d279..0ae4d607 100644 --- a/src/afl-fuzz-bitmap.c +++ b/src/afl-fuzz-bitmap.c @@ -143,17 +143,9 @@ u32 count_non_255_bytes(afl_state_t *afl, u8 *mem) { and replacing it with 0x80 or 0x01 depending on whether the tuple is hit or not. Called on every new crash or timeout, should be reasonably fast. */ -#define TIMES4(x) x, x, x, x -#define TIMES8(x) TIMES4(x), TIMES4(x) -#define TIMES16(x) TIMES8(x), TIMES8(x) -#define TIMES32(x) TIMES16(x), TIMES16(x) -#define TIMES64(x) TIMES32(x), TIMES32(x) -#define TIMES255(x) \ - TIMES64(x), TIMES64(x), TIMES64(x), TIMES32(x), TIMES16(x), TIMES8(x), \ - TIMES4(x), x, x, x const u8 simplify_lookup[256] = { - [0] = 1, [1] = TIMES255(128) + [0] = 1, [1 ... 255] = 128 }; @@ -167,11 +159,11 @@ const u8 count_class_lookup8[256] = { [1] = 1, [2] = 2, [3] = 4, - [4] = TIMES4(8), - [8] = TIMES8(16), - [16] = TIMES16(32), - [32] = TIMES32(64), - [128] = TIMES64(128) + [4 ... 7] = 8, + [8 ... 15] = 16, + [16 ... 31] = 32, + [32 ... 127] = 64, + [128 ... 255] = 128 }; |