diff options
author | Maciej Domanski <maciej.domanski@trailofbits.com> | 2022-12-27 16:54:36 +0100 |
---|---|---|
committer | Maciej Domanski <maciej.domanski@trailofbits.com> | 2022-12-27 16:54:36 +0100 |
commit | b189640a927e9ed17347b26f6579b0e41dcdda38 (patch) | |
tree | b9e090e9e2024559db5991bdb7f103d39300281c /utils/argv_fuzzing/argv-fuzz-inl.h | |
parent | 3d031f93a6366ee157cfd9a27fbb6d485d328d8e (diff) | |
download | afl++-b189640a927e9ed17347b26f6579b0e41dcdda38.tar.gz |
cleanup
Diffstat (limited to 'utils/argv_fuzzing/argv-fuzz-inl.h')
-rw-r--r-- | utils/argv_fuzzing/argv-fuzz-inl.h | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/utils/argv_fuzzing/argv-fuzz-inl.h b/utils/argv_fuzzing/argv-fuzz-inl.h index d3440799..bb8f2813 100644 --- a/utils/argv_fuzzing/argv-fuzz-inl.h +++ b/utils/argv_fuzzing/argv-fuzz-inl.h @@ -57,18 +57,20 @@ \ } while (0) -#define AFL_INIT_ARGV_PERSISTENT(persistent_buff) \ - do { \ - argv = afl_init_argv_persistent(&argc, persistent_buff); \ - } while (0) - -#define AFL_INIT_SET0_PERSISTENT(_p, persistent_buff) \ - do { \ - \ - argv = afl_init_argv_persistent(&argc, persistent_buff); \ - argv[0] = (_p); \ - if (!argc) argc = 1; \ - \ +#define AFL_INIT_ARGV_PERSISTENT(persistent_buff) \ + do { \ + \ + argv = afl_init_argv_persistent(&argc, persistent_buff); \ + \ + } while (0) + +#define AFL_INIT_SET0_PERSISTENT(_p, persistent_buff) \ + do { \ + \ + argv = afl_init_argv_persistent(&argc, persistent_buff); \ + argv[0] = (_p); \ + if (!argc) argc = 1; \ + \ } while (0) #define MAX_CMDLINE_LEN 100000 @@ -105,12 +107,13 @@ static char **afl_init_argv(int *argc) { } -static char **afl_init_argv_persistent(int *argc, unsigned char *persistent_buff) { +static char **afl_init_argv_persistent(int *argc, + unsigned char *persistent_buff) { static char *ret[MAX_CMDLINE_PAR]; unsigned char *ptr = persistent_buff; - int rc = 0; + int rc = 0; while (*ptr && rc < MAX_CMDLINE_PAR) { |