From affe7cf5b4ad27fb26145f628e712da135bfbd04 Mon Sep 17 00:00:00 2001 From: vanhauser-thc Date: Sun, 25 May 2025 11:38:05 +0200 Subject: [PATCH] set errno=0 when no afl-fuzz present --- instrumentation/afl-compiler-rt.o.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/instrumentation/afl-compiler-rt.o.c b/instrumentation/afl-compiler-rt.o.c index b6ebd5c2..c06644df 100644 --- a/instrumentation/afl-compiler-rt.o.c +++ b/instrumentation/afl-compiler-rt.o.c @@ -940,7 +940,12 @@ static void __afl_start_forkserver(void) { } - if (write(FORKSRV_FD + 1, msg, 4) != 4) { _exit(1); } + if (write(FORKSRV_FD + 1, msg, 4) != 4) { + + errno = 0; + _exit(1); + + } // Now send the parameters for the set options, increasing by option number