aboutsummaryrefslogtreecommitdiff
path: root/src/afl-showmap.c
diff options
context:
space:
mode:
authorEdward J. Schwartz <eschwartz@cert.org>2022-11-02 08:30:24 -0400
committerEdward J. Schwartz <eschwartz@cert.org>2022-11-02 08:30:24 -0400
commit1bc7cf759d02ba4ed7a54542379a4c8b71c8be3f (patch)
tree91ed7a0f8486b5574a2a7a5ef697d2a3251f1c0e /src/afl-showmap.c
parent2da6b6bf42b528325c15b410416235dc46726d4e (diff)
downloadAFLplusplus-1bc7cf759d02ba4ed7a54542379a4c8b71c8be3f.tar.gz
Use a long timeout instead of 0 for afl-showmap -t none
Diffstat (limited to 'src/afl-showmap.c')
-rw-r--r--src/afl-showmap.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/afl-showmap.c b/src/afl-showmap.c
index 4e6dc8b7..b5357da4 100644
--- a/src/afl-showmap.c
+++ b/src/afl-showmap.c
@@ -515,11 +515,10 @@ static void showmap_run_target(afl_forkserver_t *fsrv, char **argv) {
it.it_value.tv_sec = (fsrv->exec_tmout / 1000);
it.it_value.tv_usec = (fsrv->exec_tmout % 1000) * 1000;
- }
-
- signal(SIGALRM, kill_child);
+ signal(SIGALRM, kill_child);
- setitimer(ITIMER_REAL, &it, NULL);
+ setitimer(ITIMER_REAL, &it, NULL);
+ }
if (waitpid(fsrv->child_pid, &status, 0) <= 0) { FATAL("waitpid() failed"); }
@@ -1015,7 +1014,12 @@ int main(int argc, char **argv_orig, char **envp) {
}
- } else { fsrv->exec_tmout = 0; }
+ } else {
+ // The forkserver code does not have a way to completely
+ // disable the timeout, so we'll use a very, very long
+ // timeout instead.
+ fsrv->exec_tmout = 120 * 1000;
+ }
break;