1
0
mirror of https://github.com/berdav/snappy-fox synced 2025-02-16 19:40:42 +01:00

snappy-fox afl workaround

This commit is contained in:
Davide Berardi 2024-02-19 12:44:48 +01:00
parent 9d56e5c281
commit b63d124680

View File

@ -692,7 +692,7 @@ int main(int argc, char **argv) {
} }
#ifdef __AFL_LOOP #ifdef __AFL_LOOP
while (__AFL_LOOP(1000)) { while (__AFL_LOOP(UINT32_MAX)) {
#endif #endif
in = open_read_file(argv[optind]); in = open_read_file(argv[optind]);
if (in == NULL) { if (in == NULL) {
@ -701,6 +701,10 @@ int main(int argc, char **argv) {
goto exit_point; goto exit_point;
} }
#ifdef __AFL_LOOP
ftell(in);
#endif
out = open_write_file(argv[optind + 1]); out = open_write_file(argv[optind + 1]);
if (out == NULL) { if (out == NULL) {
perror("fopen write"); perror("fopen write");