diff options
author | van Hauser <vh@thc.org> | 2020-08-20 11:00:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-20 11:00:07 +0200 |
commit | 572944d7267e3612ef8da17a180bc3d8f1a958a7 (patch) | |
tree | d2110370094b94f1ed0b2ece83ed32fb8de86b15 /src/afl-fuzz-queue.c | |
parent | 17d403b8f873bcadf3fc507f9b49fe4bc0dda162 (diff) | |
parent | 779d8f6b7e3454fcfd7a43c4cf54d72ea025e67d (diff) | |
download | afl++-572944d7267e3612ef8da17a180bc3d8f1a958a7.tar.gz |
Merge pull request #514 from AFLplusplus/dev
push to stable
Diffstat (limited to 'src/afl-fuzz-queue.c')
-rw-r--r-- | src/afl-fuzz-queue.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/afl-fuzz-queue.c b/src/afl-fuzz-queue.c index f35df914..0c472845 100644 --- a/src/afl-fuzz-queue.c +++ b/src/afl-fuzz-queue.c @@ -26,8 +26,6 @@ #include <limits.h> #include <ctype.h> -#define BUF_PARAMS(name) (void **)&afl->name##_buf, &afl->name##_size - /* Mark deterministic checks as done for a particular queue entry. We use the .state file to avoid repeating deterministic fuzzing when resuming aborted scans. */ @@ -248,8 +246,9 @@ void add_to_queue(afl_state_t *afl, u8 *fname, u32 len, u8 passed_det) { } - struct queue_entry **queue_buf = ck_maybe_grow( - BUF_PARAMS(queue), afl->queued_paths * sizeof(struct queue_entry *)); + struct queue_entry **queue_buf = afl_realloc( + AFL_BUF_PARAM(queue), afl->queued_paths * sizeof(struct queue_entry *)); + if (unlikely(!queue_buf)) { PFATAL("alloc"); } queue_buf[afl->queued_paths - 1] = q; afl->last_path_time = get_cur_time(); |