From 69bd7c16eb3c6095e49d0d7a6dd2f69ea4bb9141 Mon Sep 17 00:00:00 2001 From: Dominik Maier Date: Thu, 16 Apr 2020 19:15:14 +0200 Subject: silence some clang warnings --- src/afl-tmin.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/afl-tmin.c') diff --git a/src/afl-tmin.c b/src/afl-tmin.c index 80692984..431ff0c4 100644 --- a/src/afl-tmin.c +++ b/src/afl-tmin.c @@ -811,6 +811,8 @@ int main(int argc, char **argv_orig, char **envp) { if (mem_limit_given) FATAL("Multiple -m options not supported"); mem_limit_given = 1; + if (!optarg) FATAL("Wrong usage of -m"); + if (!strcmp(optarg, "none")) { fsrv->mem_limit = 0; @@ -847,6 +849,8 @@ int main(int argc, char **argv_orig, char **envp) { if (timeout_given) FATAL("Multiple -t options not supported"); timeout_given = 1; + if (!optarg) FATAL("Wrong usage of -t"); + fsrv->exec_tmout = atoi(optarg); if (fsrv->exec_tmout < 10 || optarg[0] == '-') -- cgit 1.4.1