mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-21 05:42:12 +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. */
|
/* In child process: close fds, resume execution. */
|
||||||
|
|
||||||
if (unlikely(!child_pid)) { // just to signal afl-fuzz faster
|
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);
|
//(void)nice(-20);
|
||||||
|
|
||||||
|
@ -878,7 +878,11 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
|
|||||||
|
|
||||||
/* CHILD PROCESS */
|
/* 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
|
// enable terminating on sigpipe in the children
|
||||||
struct sigaction sa;
|
struct sigaction sa;
|
||||||
|
Reference in New Issue
Block a user