fix all cmplog errors
MODIFY
src/afl-fuzz-cmplog.c
src/afl-fuzz-cmplog.c
@@ -37,13 +37,9 @@ void cmplog_exec_child(afl_forkserver_t *fsrv, char **argv) {
setenv("___AFL_EINS_ZWEI_POLIZEI___", "1", 1);
- if (!fsrv->qemu_mode && argv[0] != fsrv->cmplog_binary) {
-
- ck_free(argv[0]);
+ if (!fsrv->qemu_mode && argv[0] != fsrv->cmplog_binary)
argv[0] = fsrv->cmplog_binary;
- }
-
execv(argv[0], argv);
}

MODIFY
src/afl-fuzz-run.c
src/afl-fuzz-run.c
@@ -46,7 +46,7 @@ u8 run_target(afl_state_t *afl, afl_forkserver_t *fsrv, u32 timeout) {
must prevent any earlier operations from venturing into that
territory. */
- if (fsrv->trace_bits) memset(fsrv->trace_bits, 0, fsrv->map_size);
+ memset(fsrv->trace_bits, 0, fsrv->map_size);
MEM_BARRIER();
@@ -120,8 +120,6 @@ u8 run_target(afl_state_t *afl, afl_forkserver_t *fsrv, u32 timeout) {
MEM_BARRIER();
- if (fsrv->trace_bits) {
-
tb4 = *(u32 *)fsrv->trace_bits;
#ifdef WORD_SIZE_64
@@ -130,8 +128,6 @@ u8 run_target(afl_state_t *afl, afl_forkserver_t *fsrv, u32 timeout) {
classify_counts(afl, (u32 *)fsrv->trace_bits);
#endif /* ^WORD_SIZE_64 */
- }
-
fsrv->prev_timed_out = fsrv->child_timed_out;
/* Report outcome to caller. */

MODIFY
src/afl-fuzz.c
src/afl-fuzz.c
@@ -1022,6 +1022,8 @@ int main(int argc, char **argv_orig, char **envp) {
ACTF("Spawning cmplog forkserver");
afl_fsrv_init_dup(&afl->cmplog_fsrv, &afl->fsrv);
// TODO: this is semi-nice
+ afl->cmplog_fsrv.trace_bits = afl->fsrv.trace_bits;
+ afl->cmplog_fsrv.qemu_mode = afl->fsrv.qemu_mode;
afl->cmplog_fsrv.cmplog_binary = afl->cmplog_binary;
afl->cmplog_fsrv.init_child_func = cmplog_exec_child;
afl_fsrv_start(&afl->cmplog_fsrv, afl->argv, &afl->stop_soon,

fix all cmplog errors