mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-15 11:28:08 +00:00
hunting ref underflow
This commit is contained in:
@ -4695,9 +4695,6 @@ pacemaker_fuzzing:
|
|||||||
|
|
||||||
} /* block */
|
} /* block */
|
||||||
|
|
||||||
queue_testcase_release(afl, afl->queue_cur);
|
|
||||||
orig_in = NULL;
|
|
||||||
|
|
||||||
return ret_val;
|
return ret_val;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -837,10 +837,17 @@ u8 *queue_testcase_take(afl_state_t *afl, struct queue_entry *q) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
q->testcase_refs++;
|
q->testcase_refs++;
|
||||||
if (!q->testcase_buf) {
|
if (unlikely(!q->testcase_buf || !q->testcase_refs)) {
|
||||||
|
if (!q->testcase_buf) {
|
||||||
|
|
||||||
FATAL("Testcase buf is NULL, this should never happen");
|
FATAL("Testcase buf is NULL, this should never happen");
|
||||||
|
|
||||||
|
}
|
||||||
|
if (!q->testcase_refs) {
|
||||||
|
|
||||||
|
FATAL("Testcase ref overflow. Missing a testcase release somwhere?");
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return q->testcase_buf;
|
return q->testcase_buf;
|
||||||
|
Reference in New Issue
Block a user