resize fix + code format

This commit is contained in:
Dominik Maier
2020-04-10 17:47:22 +02:00
parent 6aa6af04ac
commit f0f83bab52
10 changed files with 32 additions and 24 deletions

View File

@ -187,7 +187,8 @@ void init_cmplog_forkserver(afl_state_t *afl) {
rlen = 4;
u32 timeout_ms = afl->fsrv.exec_tmout * FORK_WAIT_MULT;
/* Reuse readfds as exceptfds to see when the child closed the pipe */
u32 exec_ms = read_timed(afl->cmplog_fsrv_st_fd, &status, rlen, timeout_ms);
u32 exec_ms = read_timed(afl->cmplog_fsrv_st_fd, &status, rlen, timeout_ms,
&afl->stop_soon);
if (!exec_ms) {
@ -416,7 +417,8 @@ u8 run_cmplog_target(afl_state_t *afl, u32 timeout) {
/* Configure timeout, as requested by user, then wait for child to terminate.
*/
exec_ms = read_timed(afl->cmplog_fsrv_st_fd, &status, 4, timeout);
exec_ms =
read_timed(afl->cmplog_fsrv_st_fd, &status, 4, timeout, &afl->stop_soon);
if (exec_ms > timeout) {