about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2021-10-24 19:41:06 +0200
committervanhauser-thc <vh@thc.org>2021-10-24 19:41:06 +0200
commit0f49463edec0c019bd098659fa74c58a2d28c439 (patch)
treefc1862869fc9668190a6693c93583d0d82fdeeb5 /src
parenta7ee11a1747347847b06a4226f2800dd780f7c16 (diff)
downloadafl++-0f49463edec0c019bd098659fa74c58a2d28c439.tar.gz
fix
Diffstat (limited to 'src')
-rw-r--r--src/afl-forkserver.c2
-rw-r--r--src/afl-showmap.c9
2 files changed, 7 insertions, 4 deletions
diff --git a/src/afl-forkserver.c b/src/afl-forkserver.c
index c570a2bb..80b295e0 100644
--- a/src/afl-forkserver.c
+++ b/src/afl-forkserver.c
@@ -1301,7 +1301,7 @@ fsrv_run_result_t afl_fsrv_run_target(afl_forkserver_t *fsrv, u32 timeout,
 
   }
 
-  if (!WIFSTOPPED(fsrv->child_status)) { fsrv->child_pid = -1 ; }
+  if (!WIFSTOPPED(fsrv->child_status)) { fsrv->child_pid = -1; }
 
   fsrv->total_execs++;
 
diff --git a/src/afl-showmap.c b/src/afl-showmap.c
index 3a244c04..3826e385 100644
--- a/src/afl-showmap.c
+++ b/src/afl-showmap.c
@@ -77,7 +77,7 @@ static u32 tcnt, highest;              /* tuple content information         */
 
 static u32 in_len;                     /* Input data length                 */
 
-static u32 map_size = MAP_SIZE;
+static u32 map_size = MAP_SIZE, timed_out = 0;
 
 static bool quiet_mode,                /* Hide non-essential messages?      */
     edges_only,                        /* Ignore hit counts?                */
@@ -148,6 +148,7 @@ static const u8 count_class_binary[256] = {
 
 static void kill_child() {
 
+  timed_out = 1;
   if (fsrv->child_pid > 0) {
 
     kill(fsrv->child_pid, fsrv->kill_signal);
@@ -373,9 +374,10 @@ static void showmap_run_target_forkserver(afl_forkserver_t *fsrv, u8 *mem,
 
   if (!quiet_mode) {
 
-    if (fsrv->last_run_timed_out) {
+    if (timed_out || fsrv->last_run_timed_out) {
 
       SAYF(cLRD "\n+++ Program timed off +++\n" cRST);
+      timed_out = 0;
 
     } else if (stop_soon) {
 
@@ -581,9 +583,10 @@ static void showmap_run_target(afl_forkserver_t *fsrv, char **argv) {
 
   if (!quiet_mode) {
 
-    if (fsrv->last_run_timed_out) {
+    if (timed_out || fsrv->last_run_timed_out) {
 
       SAYF(cLRD "\n+++ Program timed off +++\n" cRST);
+      timed_out = 0;
 
     } else if (stop_soon) {