fixed ref check

This commit is contained in:
Dominik Maier
2020-10-06 16:20:32 +02:00
parent 693252c737
commit 4f207b4eba

View File

@ -772,13 +772,14 @@ u32 calculate_score(afl_state_t *afl, struct queue_entry *q) {
inline void queue_testcase_release(afl_state_t *afl, struct queue_entry *q) { inline void queue_testcase_release(afl_state_t *afl, struct queue_entry *q) {
(void)afl; (void)afl;
q->testcase_refs--; if (unlikely(q->testcase_refs == 0)) {
if (unlikely(q->testcase_refs < 0)) {
FATAL("Testcase refcount smaller than 0"); FATAL("Testcase refcount reduced past 0");
} }
q->testcase_refs--;
} }
/* Returns the testcase buf from the file behind this queue entry. /* Returns the testcase buf from the file behind this queue entry.