Skip to content

Commit

Permalink
Merge pull request #29 from R9295/main
Browse files Browse the repository at this point in the history
fix forkserver sending message when not necessary
  • Loading branch information
vanhauser-thc authored Aug 15, 2024
2 parents 4b4fdab + 41fbd28 commit 1c58dc9
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions unicornafl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,14 +537,13 @@ class UCAFL {
/* Parent supports testcases via shared map - and the user wants to
* use it. Tell AFL. */
status = (FS_OPT_ENABLED | FS_OPT_SHDMEM_FUZZ);
/* Phone home and tell the parent that we're OK. If parent isn't there,
assume we're not running in forkserver mode and just execute
program. */
if (write(FORKSRV_FD + 1, &status, 4) != 4)
return UC_AFL_RET_NO_AFL;
}

/* Phone home and tell the parent that we're OK. If parent isn't there,
assume we're not running in forkserver mode and just execute
program. */

if (write(FORKSRV_FD + 1, &status, 4) != 4)
return UC_AFL_RET_NO_AFL;

/* afl tells us in an extra message if it accepted this option or not */
if (this->afl_testcase_ptr_ && getenv(SHM_FUZZ_ENV_VAR)) {
Expand Down

0 comments on commit 1c58dc9

Please sign in to comment.