diff options
author | Dominik Maier <domenukk@gmail.com> | 2021-01-19 13:16:39 +0100 |
---|---|---|
committer | Dominik Maier <domenukk@gmail.com> | 2021-01-19 13:16:39 +0100 |
commit | 292f91a55f6af5e06b41b429e55f65b7df4d8d16 (patch) | |
tree | 920cac59274d8ef150bcb7dad4b3271ca1da5df3 | |
parent | e91f3b0de65376b001d45892cc6bdd2fcafde949 (diff) | |
download | afl++-292f91a55f6af5e06b41b429e55f65b7df4d8d16.tar.gz |
tiny scan-build nags fixed
m--------- | qemu_mode/qemuafl | 0 | ||||
-rw-r--r-- | src/afl-fuzz.c | 6 | ||||
m--------- | unicorn_mode/unicornafl | 0 |
3 files changed, 3 insertions, 3 deletions
diff --git a/qemu_mode/qemuafl b/qemu_mode/qemuafl -Subproject 5400ce883a751582473665d8fd18f8e8f9d14cd +Subproject 21ff34383764a8c6f66509b3b8d5282468c721e diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c index bb2674f0..e6317f43 100644 --- a/src/afl-fuzz.c +++ b/src/afl-fuzz.c @@ -586,7 +586,7 @@ int main(int argc, char **argv_orig, char **envp) { if (afl->timeout_given) { FATAL("Multiple -t options not supported"); } - if (sscanf(optarg, "%u%c", &afl->fsrv.exec_tmout, &suffix) < 1 || + if (!optarg || sscanf(optarg, "%u%c", &afl->fsrv.exec_tmout, &suffix) < 1 || optarg[0] == '-') { FATAL("Bad syntax used for -t"); @@ -768,7 +768,7 @@ int main(int argc, char **argv_orig, char **envp) { case 'V': { afl->most_time_key = 1; - if (sscanf(optarg, "%llu", &afl->most_time) < 1 || optarg[0] == '-') { + if (!optarg || sscanf(optarg, "%llu", &afl->most_time) < 1 || optarg[0] == '-') { FATAL("Bad syntax used for -V"); @@ -779,7 +779,7 @@ int main(int argc, char **argv_orig, char **envp) { case 'E': { afl->most_execs_key = 1; - if (sscanf(optarg, "%llu", &afl->most_execs) < 1 || optarg[0] == '-') { + if (!optarg || sscanf(optarg, "%llu", &afl->most_execs) < 1 || optarg[0] == '-') { FATAL("Bad syntax used for -E"); diff --git a/unicorn_mode/unicornafl b/unicorn_mode/unicornafl -Subproject 8cca4801adb767dce7cf72202d7d25bdb420cf7 +Subproject 1c88501b435fa10f95c8df0bbe47ccb5313b042 |