mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-09 16:51:34 +00:00
fixes
This commit is contained in:
parent
7e54c8d7f6
commit
07c3e47e6b
@ -479,9 +479,17 @@ void print_suggested_envs(char *mispelled_env) {
|
||||
|
||||
size_t end = start + strcspn(afl_env + start, "_") + 1;
|
||||
memcpy(reduced, afl_env, start);
|
||||
if (end < afl_env_len)
|
||||
if (end < afl_env_len) {
|
||||
|
||||
memcpy(reduced + start, afl_env + end, afl_env_len - end);
|
||||
reduced[afl_env_len - end + start] = 0;
|
||||
|
||||
}
|
||||
|
||||
if (afl_env_len + start >= end) {
|
||||
|
||||
reduced[afl_env_len - end + start] = 0;
|
||||
|
||||
}
|
||||
|
||||
int distance = string_distance_levenshtein(reduced, env_name);
|
||||
if (distance < ENV_SIMILARITY_TRESHOLD && seen[j] == 0) {
|
||||
|
@ -121,7 +121,7 @@ write_to_testcase(afl_state_t *afl, void *mem, u32 len) {
|
||||
});
|
||||
|
||||
/* everything as planned. use the potentially new data. */
|
||||
afl_fsrv_write_to_testcase(&afl->fsrv, new_buf, new_size);
|
||||
afl_fsrv_write_to_testcase(&afl->fsrv, new_mem, new_size);
|
||||
|
||||
} else {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user