mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 11:08:06 +00:00
Fix syntax error when compiling without zlib
commit ecb5854be0
("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.
This commit is contained in:
@ -2237,7 +2237,6 @@ int main(int argc, char **argv_orig, char **envp) {
|
|||||||
snprintf(fn, PATH_MAX, "%s/fastresume.bin", afl->out_dir);
|
snprintf(fn, PATH_MAX, "%s/fastresume.bin", afl->out_dir);
|
||||||
#ifdef HAVE_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
if ((fr_fd = ZLIBOPEN(fn, "rb")) != NULL) {
|
if ((fr_fd = ZLIBOPEN(fn, "rb")) != NULL) {
|
||||||
|
|
||||||
#else
|
#else
|
||||||
if ((fr_fd = open(fn, O_RDONLY)) >= 0) {
|
if ((fr_fd = open(fn, O_RDONLY)) >= 0) {
|
||||||
|
|
||||||
@ -3341,9 +3340,9 @@ stop_fuzzing:
|
|||||||
ACTF("Writing %s ...", fr);
|
ACTF("Writing %s ...", fr);
|
||||||
#ifdef HAVE_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
if ((fr_fd = ZLIBOPEN(fr, "wb9")) != NULL) {
|
if ((fr_fd = ZLIBOPEN(fr, "wb9")) != NULL) {
|
||||||
|
|
||||||
#else
|
#else
|
||||||
if ((fr_fd = open(fr, O_WRONLY | O_TRUNC | O_CREAT, DEFAULT_PERMISSION)) >=
|
if ((fr_fd = open(fr, O_WRONLY | O_TRUNC | O_CREAT, DEFAULT_PERMISSION)) >=
|
||||||
|
0) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
u8 ver_string[8];
|
u8 ver_string[8];
|
||||||
|
Reference in New Issue
Block a user