diff options
author | van Hauser <vh@thc.org> | 2020-12-15 09:39:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-15 09:39:10 +0100 |
commit | 8e712d1a740b30f9e2d5655d97d4cac6e8aed543 (patch) | |
tree | 912ea1a05ba03709563b9ebea43957cd9a463fbf /src/afl-as.c | |
parent | 12d62d539353517abee8069df6e591f4fc474e93 (diff) | |
parent | 149ec41e9039d79420088c6de7bfc7feba5fe937 (diff) | |
download | afl++-8e712d1a740b30f9e2d5655d97d4cac6e8aed543.tar.gz |
Merge pull request #628 from AFLplusplus/dev 3.0c
Final push to stable
Diffstat (limited to 'src/afl-as.c')
-rw-r--r-- | src/afl-as.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/afl-as.c b/src/afl-as.c index 3d6f7d5e..7de267a3 100644 --- a/src/afl-as.c +++ b/src/afl-as.c @@ -47,6 +47,7 @@ #include <stdlib.h> #include <string.h> #include <time.h> +#include <limits.h> #include <ctype.h> #include <fcntl.h> @@ -131,6 +132,11 @@ static void edit_params(int argc, char **argv) { if (!tmp_dir) { tmp_dir = "/tmp"; } as_params = ck_alloc((argc + 32) * sizeof(u8 *)); + if (unlikely((INT_MAX - 32) < argc || !as_params)) { + + FATAL("Too many parameters passed to as"); + + } as_params[0] = afl_as ? afl_as : (u8 *)"as"; |