about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--src/afl-forkserver.c9
2 files changed, 9 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index aaeb136c..f615c7dd 100644
--- a/Makefile
+++ b/Makefile
@@ -153,8 +153,8 @@ endif
 
 ifdef ASAN_BUILD
   $(info Compiling ASAN version of binaries)
-  CFLAGS+=-fsanitize=address
-  LDFLAGS+=-fsanitize=address
+  CFLAGS+=-fsanitize=address -fstack-protector-strong
+  LDFLAGS+=-fsanitize=address -fstack-protector-strong
 endif
 
 ifdef PROFILING
diff --git a/src/afl-forkserver.c b/src/afl-forkserver.c
index 962ca86d..a863efcc 100644
--- a/src/afl-forkserver.c
+++ b/src/afl-forkserver.c
@@ -319,10 +319,15 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv) {
     u32 time = read_timed(fsrv->fsrv_st_fd, &status, rlen,
                           fsrv->exec_tmout * FORK_WAIT_MULT);
 
-    if (!time) {
+    if (time > fsrv->exec_tmout * FORK_WAIT_MULT) {
 
       fsrv->child_timed_out = 1;
-      kill(fsrv->child_pid, SIGKILL);
+      kill(fsrv->fsrv_pid, SIGKILL);
+
+    }
+    if (!time) {
+
+      kill(fsrv->fsrv_pid, SIGKILL);
 
     }