mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-13 18:48:08 +00:00
fixed gcc analyzer warnings
This commit is contained in:
@ -94,9 +94,9 @@ write_to_testcase(afl_state_t *afl, void *mem, u32 len) {
|
||||
|
||||
if (unlikely(afl->custom_mutators_count)) {
|
||||
|
||||
u8 * new_buf = NULL;
|
||||
ssize_t new_size = len;
|
||||
void * new_mem = mem;
|
||||
u8 * new_mem = mem;
|
||||
u8 * new_buf = NULL;
|
||||
|
||||
LIST_FOREACH(&afl->custom_mutator_list, struct custom_mutator, {
|
||||
|
||||
@ -152,13 +152,13 @@ static void write_with_gap(afl_state_t *afl, u8 *mem, u32 len, u32 skip_at,
|
||||
if (unlikely(!mem_trimmed)) { PFATAL("alloc"); }
|
||||
|
||||
ssize_t new_size = len - skip_len;
|
||||
void * new_mem = mem;
|
||||
u8 * new_buf = NULL;
|
||||
u8 * new_mem = mem;
|
||||
|
||||
bool post_process_skipped = true;
|
||||
|
||||
if (unlikely(afl->custom_mutators_count)) {
|
||||
|
||||
u8 *new_buf = NULL;
|
||||
new_mem = mem_trimmed;
|
||||
|
||||
LIST_FOREACH(&afl->custom_mutator_list, struct custom_mutator, {
|
||||
@ -207,7 +207,7 @@ static void write_with_gap(afl_state_t *afl, u8 *mem, u32 len, u32 skip_at,
|
||||
|
||||
// If we did post_processing, copy directly from the new_buf bufer
|
||||
|
||||
memcpy(afl->fsrv.shmem_fuzz, new_buf, new_size);
|
||||
memcpy(afl->fsrv.shmem_fuzz, new_mem, new_size);
|
||||
|
||||
}
|
||||
|
||||
@ -265,7 +265,7 @@ static void write_with_gap(afl_state_t *afl, u8 *mem, u32 len, u32 skip_at,
|
||||
|
||||
if (!post_process_skipped) {
|
||||
|
||||
ck_write(fd, new_buf, new_size, afl->fsrv.out_file);
|
||||
ck_write(fd, new_mem, new_size, afl->fsrv.out_file);
|
||||
|
||||
} else {
|
||||
|
||||
|
Reference in New Issue
Block a user