From 9df906454935134b68ec330e7fddddf6f6987d96 Mon Sep 17 00:00:00 2001 From: Thomas Hebb Date: Tue, 6 Aug 2024 11:37:19 -0700 Subject: Fix syntax error when compiling without zlib commit ecb5854be08fa ("add zlib compression for fast resume") added new logic selected at compile-time when zlib is present. Unfortunately, it also broke the existing logic by removing the last line of a multi-line if statement, resulting in a syntax error when zlib isn't present. Restore the line as it was. --- src/afl-fuzz.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/afl-fuzz.c') diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c index 9867eba3..1546597e 100644 --- a/src/afl-fuzz.c +++ b/src/afl-fuzz.c @@ -2237,7 +2237,6 @@ int main(int argc, char **argv_orig, char **envp) { snprintf(fn, PATH_MAX, "%s/fastresume.bin", afl->out_dir); #ifdef HAVE_ZLIB if ((fr_fd = ZLIBOPEN(fn, "rb")) != NULL) { - #else if ((fr_fd = open(fn, O_RDONLY)) >= 0) { @@ -3341,9 +3340,9 @@ stop_fuzzing: ACTF("Writing %s ...", fr); #ifdef HAVE_ZLIB if ((fr_fd = ZLIBOPEN(fr, "wb9")) != NULL) { - #else if ((fr_fd = open(fr, O_WRONLY | O_TRUNC | O_CREAT, DEFAULT_PERMISSION)) >= + 0) { #endif u8 ver_string[8]; -- cgit 1.4.1