mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-17 20:28:08 +00:00
Ensure random colorization always changes byte
This commit is contained in:
@ -172,7 +172,15 @@ static void random_replace(afl_state_t *afl, u8 *buf, u32 len) {
|
||||
|
||||
for (u32 i = 0; i < len; i++) {
|
||||
|
||||
buf[i] = rand_below(afl, 256);
|
||||
u8 c;
|
||||
|
||||
do {
|
||||
|
||||
c = rand_below(afl, 256);
|
||||
|
||||
} while (c == buf[i]);
|
||||
|
||||
buf[i] = c;
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user