diff options
author | van Hauser <vh@thc.org> | 2020-11-03 15:15:58 +0100 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-11-03 15:15:58 +0100 |
commit | 245f511a1d3432927ba101e270d7c6e4157e8e63 (patch) | |
tree | 4bff6da53aaa743ce96e31ca5b80f11495de56ce /src | |
parent | 8bccf5655354540db5f6f208731d261dcfe05e2d (diff) | |
download | afl++-245f511a1d3432927ba101e270d7c6e4157e8e63.tar.gz |
fsrv copy: out_fd = 0 on stdin
Diffstat (limited to 'src')
-rw-r--r-- | src/afl-forkserver.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/afl-forkserver.c b/src/afl-forkserver.c index 313aa363..d294f7fc 100644 --- a/src/afl-forkserver.c +++ b/src/afl-forkserver.c @@ -113,7 +113,16 @@ void afl_fsrv_init_dup(afl_forkserver_t *fsrv_to, afl_forkserver_t *from) { fsrv_to->child_pid = -1; fsrv_to->use_fauxsrv = 0; fsrv_to->last_run_timed_out = 0; - fsrv_to->out_fd = -1; + + if (fsrv_to->use_stdin) { + + fsrv_to->out_fd = 0; + + } else { + + fsrv_to->out_fd = -1; + + } fsrv_to->init_child_func = fsrv_exec_child; // Note: do not copy ->add_extra_func |