mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-15 19:38:09 +00:00
added bounds check to pivot_inputs (fixes #921)
This commit is contained in:
@ -1294,10 +1294,14 @@ void pivot_inputs(afl_state_t *afl) {
|
|||||||
|
|
||||||
if (src_str && sscanf(src_str + 1, "%06u", &src_id) == 1) {
|
if (src_str && sscanf(src_str + 1, "%06u", &src_id) == 1) {
|
||||||
|
|
||||||
|
if (src_id < afl->queued_paths) {
|
||||||
|
|
||||||
struct queue_entry *s = afl->queue_buf[src_id];
|
struct queue_entry *s = afl->queue_buf[src_id];
|
||||||
|
|
||||||
if (s) { q->depth = s->depth + 1; }
|
if (s) { q->depth = s->depth + 1; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (afl->max_depth < q->depth) { afl->max_depth = q->depth; }
|
if (afl->max_depth < q->depth) { afl->max_depth = q->depth; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user