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,8 +1046,12 @@ static void __afl_start_forkserver(void) {
|
||||
/* In child process: close fds, resume execution. */
|
||||
|
||||
if (unlikely(!child_pid)) { // just to signal afl-fuzz faster
|
||||
if (unlikely(getenv("AFL_PRELOAD") != NULL)) {
|
||||
|
||||
unsetenv("AFL_FORKSERVER_PARENT");
|
||||
|
||||
}
|
||||
|
||||
//(void)nice(-20);
|
||||
|
||||
signal(SIGCHLD, old_sigchld_handler);
|
||||
|
@ -878,8 +878,12 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
|
||||
|
||||
/* CHILD PROCESS */
|
||||
|
||||
if (unlikely(getenv("AFL_PRELOAD") != NULL)) {
|
||||
|
||||
setenv("AFL_FORKSERVER_PARENT", "1", 0);
|
||||
|
||||
}
|
||||
|
||||
// enable terminating on sigpipe in the children
|
||||
struct sigaction sa;
|
||||
memset((char *)&sa, 0, sizeof(sa));
|
||||
|
Reference in New Issue
Block a user