mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-20 21:25:43 +00:00
We check before if the AFL_PRELOAD env variable is set
This commit is contained in:
@ -1046,7 +1046,11 @@ static void __afl_start_forkserver(void) {
|
||||
/* In child process: close fds, resume execution. */
|
||||
|
||||
if (unlikely(!child_pid)) { // just to signal afl-fuzz faster
|
||||
unsetenv("AFL_FORKSERVER_PARENT");
|
||||
if (unlikely(getenv("AFL_PRELOAD") != NULL)) {
|
||||
|
||||
unsetenv("AFL_FORKSERVER_PARENT");
|
||||
|
||||
}
|
||||
|
||||
//(void)nice(-20);
|
||||
|
||||
|
@ -878,7 +878,11 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
|
||||
|
||||
/* CHILD PROCESS */
|
||||
|
||||
setenv("AFL_FORKSERVER_PARENT", "1", 0);
|
||||
if (unlikely(getenv("AFL_PRELOAD") != NULL)) {
|
||||
|
||||
setenv("AFL_FORKSERVER_PARENT", "1", 0);
|
||||
|
||||
}
|
||||
|
||||
// enable terminating on sigpipe in the children
|
||||
struct sigaction sa;
|
||||
|
Reference in New Issue
Block a user