final changes for pre-3.0

This commit is contained in:
vanhauser-thc
2020-09-05 13:18:28 +02:00
parent 4b3ad5f037
commit e30b2c6af6
27 changed files with 188 additions and 216 deletions

View File

@ -138,8 +138,7 @@ static u8 check_if_text(struct queue_entry *q) {
}
// non-overlong 2-byte
if (len - offset > 1 &&
((0xC2 <= buf[offset + 0] && buf[offset + 0] <= 0xDF) &&
if (len - offset > 1 && ((0xC2 <= buf[offset + 0] && buf[offset + 0] <= 0xDF) &&
(0x80 <= buf[offset + 1] && buf[offset + 1] <= 0xBF))) {
offset += 2;
@ -230,7 +229,7 @@ void add_to_queue(afl_state_t *afl, u8 *fname, u32 len, u8 passed_det) {
} else {
afl->q_prev100 = afl->queue = afl->queue_top = q;
afl->queue = afl->queue_top = q;
}
@ -274,15 +273,15 @@ void add_to_queue(afl_state_t *afl, u8 *fname, u32 len, u8 passed_det) {
void destroy_queue(afl_state_t *afl) {
struct queue_entry *q = afl->queue, *n;
struct queue_entry *q;
u32 i;
while (q) {
for (i = 0; i < afl->queued_paths; i++) {
n = q->next;
q = afl->queue_buf[i];
ck_free(q->fname);
ck_free(q->trace_mini);
ck_free(q);
q = n;
}