about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2024-08-18 16:06:57 +0200
committervanhauser-thc <vh@thc.org>2024-08-18 16:06:57 +0200
commit6edc3b51ba81d577eeb4a64299916c1eaadfdd70 (patch)
tree71701c4cd8b6f9f82ef466bbe3ad5de2af0b6f86
parent93fb1d1a241168f67f65bdb4dbdb05c0b5f25acf (diff)
downloadafl++-6edc3b51ba81d577eeb4a64299916c1eaadfdd70.tar.gz
fix AFL_OLD_FORKSERVER
-rw-r--r--instrumentation/afl-compiler-rt.o.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/instrumentation/afl-compiler-rt.o.c b/instrumentation/afl-compiler-rt.o.c
index 6e04ae47..0da689b2 100644
--- a/instrumentation/afl-compiler-rt.o.c
+++ b/instrumentation/afl-compiler-rt.o.c
@@ -886,11 +886,11 @@ static void __afl_start_forkserver(void) {
   /* Phone home and tell the parent that we're OK. If parent isn't there,
      assume we're not running in forkserver mode and just execute program. */
 
-  // return because possible non-forkserver usage
-  if (write(FORKSRV_FD + 1, msg, 4) != 4) { return; }
-
   if (!__afl_old_forkserver) {
 
+    // return because possible non-forkserver usage
+    if (write(FORKSRV_FD + 1, msg, 4) != 4) { return; }
+
     if (read(FORKSRV_FD, reply, 4) != 4) { _exit(1); }
     if (tmp != status2) {