mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-15 03:18:07 +00:00
extras: afl_realloc -> ck_realloc
This commit is contained in:
@ -984,7 +984,7 @@ void afl_fsrv_write_to_testcase(afl_forkserver_t *fsrv, u8 *buf, size_t len) {
|
||||
if (fd < 0) { PFATAL("Unable to create '%s'", fsrv->out_file); }
|
||||
|
||||
} else if (unlikely(!fd)) {
|
||||
|
||||
|
||||
// We should never have stdin as fd here, 0 is likely unset.
|
||||
FATAL("Nowhere to write output to (neither out_fd nor out_file set)");
|
||||
|
||||
|
@ -423,8 +423,8 @@ void dedup_extras(afl_state_t *afl) {
|
||||
}
|
||||
|
||||
if (afl->extras_cnt != orig_cnt)
|
||||
afl->extras = afl_realloc((void **)&afl->extras,
|
||||
afl->extras_cnt * sizeof(struct extra_data));
|
||||
afl->extras = ck_realloc((void **)&afl->extras,
|
||||
afl->extras_cnt * sizeof(struct extra_data));
|
||||
|
||||
}
|
||||
|
||||
@ -462,8 +462,18 @@ void add_extra(afl_state_t *afl, u8 *mem, u32 len) {
|
||||
|
||||
}
|
||||
|
||||
afl->extras = afl_realloc((void **)&afl->extras,
|
||||
(afl->extras_cnt + 1) * sizeof(struct extra_data));
|
||||
if (afl->extra) {
|
||||
|
||||
afl->extras = ck_realloc((void **)&afl->extras,
|
||||
(afl->extras_cnt + 1) * sizeof(struct extra_data));
|
||||
|
||||
} else {
|
||||
|
||||
afl->extras = ck_alloc((void **)&afl->extras,
|
||||
(afl->extras_cnt + 1) * sizeof(struct extra_data));
|
||||
|
||||
}
|
||||
|
||||
if (unlikely(!afl->extras)) { PFATAL("alloc"); }
|
||||
|
||||
afl->extras[afl->extras_cnt].data = ck_alloc(len);
|
||||
|
Reference in New Issue
Block a user