mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 19:08:08 +00:00
fix regression in class lookup
This commit is contained in:
@ -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
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user