code cleanups (shadowed vars, (un)signed type mismatches, format types, etc.)

This commit is contained in:
hexcoder-
2021-01-04 20:40:53 +01:00
parent 5c22472616
commit c6e038fe25
18 changed files with 144 additions and 122 deletions

View File

@ -445,6 +445,9 @@ static void try_to_add_to_dict(afl_state_t *afl, u64 v, u8 shape) {
u32 k;
u8 cons_ff = 0, cons_0 = 0;
if (shape > sizeof(v)) FATAL("shape is greater than %zu, please report!", sizeof(v));
for (k = 0; k < shape; ++k) {
if (b[k] == 0) {
@ -453,7 +456,7 @@ static void try_to_add_to_dict(afl_state_t *afl, u64 v, u8 shape) {
} else if (b[k] == 0xff) {
++cons_0;
++cons_ff;
} else {
@ -667,12 +670,12 @@ static u8 rtn_fuzz(afl_state_t *afl, u32 key, u8 *orig_buf, u8 *buf, u32 len) {
u8 status = 0;
// opt not in the paper
u32 fails = 0;
// u32 fails = 0;
u8 found_one = 0;
for (i = 0; i < loggeds; ++i) {
fails = 0;
u32 fails = 0;
struct cmpfn_operands *o =
&((struct cmpfn_operands *)afl->shm.cmp_map->log[key])[i];