diff options
author | Thomas Hebb <tch@meta.com> | 2024-08-06 11:37:19 -0700 |
---|---|---|
committer | Thomas Hebb <tch@meta.com> | 2024-08-06 11:37:19 -0700 |
commit | 9df906454935134b68ec330e7fddddf6f6987d96 (patch) | |
tree | befa78ee49feee5fcc3cf8c2551f4b865468efe7 /src | |
parent | 2e57d865769541ca5fe8463e959c671f0eb7558a (diff) | |
download | afl++-9df906454935134b68ec330e7fddddf6f6987d96.tar.gz |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/afl-fuzz.c | 3 |
1 files changed, 1 insertions, 2 deletions
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]; |