quickfix for first big bug that use_stdin was not correctly initialized and could not be set

This commit is contained in:
van Hauser
2020-03-09 19:40:59 +01:00
parent 253bbf3a5c
commit 73a1b39446
7 changed files with 17 additions and 8 deletions

View File

@ -135,6 +135,15 @@ void handle_timeout(int sig) {
void afl_fsrv_init(afl_forkserver_t *fsrv) {
uint32_t i, j = 0;
// this is the default and is != 0 so we need to set it if fsrv is still
// uninitialized
for (i = 0; i < sizeof(afl_forkserver_t) && j == 0; i++)
if (((char*)fsrv)[i] != 0)
j = 1;
if (j == 0)
fsrv->use_stdin = 1;
list_append(&fsrv_list, fsrv);
}