code format

This commit is contained in:
Dominik Maier
2020-08-07 17:32:41 +02:00
parent fd9a7e719d
commit 699ebaa8e2
5 changed files with 19 additions and 11 deletions

View File

@ -146,9 +146,12 @@ restart_select:
restart_read:
if (*stop_soon_p) {
// Early return - the user wants to quit.
return 0;
}
len_read = read(fd, (u8 *)buf, 4);
if (likely(len_read == 4)) { // for speed we put this first
@ -695,7 +698,8 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
}
offset = 0;
while (offset < (u32)status && (u8)dict[offset] + offset < (u32)status) {
while (offset < (u32)status &&
(u8)dict[offset] + offset < (u32)status) {
fsrv->function_ptr(fsrv->function_opt, dict + offset + 1,
(u8)dict[offset]);

View File

@ -4454,7 +4454,8 @@ pacemaker_fuzzing:
retry_splicing_puppet:
if (afl->use_splicing && splice_cycle++ < (u32)afl->SPLICE_CYCLES_puppet &&
if (afl->use_splicing &&
splice_cycle++ < (u32)afl->SPLICE_CYCLES_puppet &&
afl->queued_paths > 1 && afl->queue_cur->len > 1) {
struct queue_entry *target;
@ -4524,7 +4525,8 @@ pacemaker_fuzzing:
the last differing byte. Bail out if the difference is just a single
byte or so. */
locate_diffs(in_buf, new_buf, MIN(len, (s32)target->len), &f_diff, &l_diff);
locate_diffs(in_buf, new_buf, MIN(len, (s32)target->len), &f_diff,
&l_diff);
if (f_diff < 0 || l_diff < 2 || f_diff == l_diff) {

View File

@ -659,9 +659,9 @@ static u8 cmp_fuzz(afl_state_t *afl, u32 key, u8 *orig_buf, u8 *buf, u32 len) {
}
static u8 rtn_extend_encoding(afl_state_t *afl,
u8 *pattern, u8 *repl, u8 *o_pattern, u32 idx,
u8 *orig_buf, u8 *buf, u32 len, u8 *status) {
static u8 rtn_extend_encoding(afl_state_t *afl, u8 *pattern, u8 *repl,
u8 *o_pattern, u32 idx, u8 *orig_buf, u8 *buf,
u32 len, u8 *status) {
u32 i;
u32 its_len = MIN((u32)32, len - idx);
@ -853,7 +853,8 @@ u8 input_to_state_stage(afl_state_t *afl, u8 *orig_buf, u8 *buf, u32 len,
if (afl->shm.cmp_map->headers[k].type == CMP_TYPE_INS) {
afl->stage_max += MIN((u32)(afl->shm.cmp_map->headers[k].hits), (u32)CMP_MAP_H);
afl->stage_max +=
MIN((u32)(afl->shm.cmp_map->headers[k].hits), (u32)CMP_MAP_H);
} else {

View File

@ -256,7 +256,8 @@ static u32 write_results_to_file(afl_forkserver_t *fsrv, u8 *outfile) {
/* Execute target application. */
static void showmap_run_target_forkserver(afl_forkserver_t *fsrv, u8 *mem, u32 len) {
static void showmap_run_target_forkserver(afl_forkserver_t *fsrv, u8 *mem,
u32 len) {
afl_fsrv_write_to_testcase(fsrv, mem, len);