Various fixes for warnings, extends #1818

This commit is contained in:
Dominik Maier
2023-07-30 21:59:57 +00:00
parent 168ade3b70
commit d0782a7f03
4 changed files with 10 additions and 9 deletions

View File

@ -25,13 +25,14 @@
u32 max_len - the maximum size the mutated buffer may grow to
*/
#ifndef _ANDROID_ASHMEM_H
#define AFL_MUTATIONS_H
#ifndef AFL_MUTATIONS_H
#define AFL_MUTATIONS_H
#include <stdbool.h>
#include "afl-fuzz.h"
#include <stdbool.h>
#include <inttypes.h>
#include "afl-fuzz.h"
#define MUT_STRATEGY_ARRAY_SIZE 256
#define MUT_STRATEGY_ARRAY_SIZE 256
enum {
@ -2456,7 +2457,7 @@ inline u32 afl_mutate(afl_state_t *afl, u8 *buf, u32 len, u32 steps,
}
char buf[20];
snprintf(buf, sizeof(buf), "%lld", val);
snprintf(buf, sizeof(buf), "%" PRId64, val);
u32 old_len = off2 - off;
u32 new_len = strlen(buf);

View File

@ -2995,7 +2995,7 @@ havoc_stage:
// fprintf(stderr, "val: %u-%u = %ld\n", off, off2, val);
char buf[20];
snprintf(buf, sizeof(buf), "%lld", val);
snprintf(buf, sizeof(buf), "%" PRId64, val);
// fprintf(stderr, "BEFORE: %s\n", out_buf);

View File

@ -2665,7 +2665,7 @@ static u8 rtn_fuzz(afl_state_t *afl, u32 key, u8 *orig_buf, u8 *buf, u8 *cbuf,
}
rtn_fuzz_next_iter:
// rtn_fuzz_next_iter:
afl->stage_cur++;
}