about summary refs log tree commit diff
path: root/src/afl-cc.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2023-06-29 18:00:46 +0300
committerGitHub <noreply@github.com>2023-06-29 18:00:46 +0300
commit641d02ab7211585e72e215405cd49c0712a8b4df (patch)
tree6bf544caf53f4ef7f7ca8ad02c2a412150758aa9 /src/afl-cc.c
parentaf8c68a774d0271ae6a2145ac566e1c7024e95d5 (diff)
parent3e1d7941077b1457f702988063d6b9fdd9b80740 (diff)
downloadafl++-641d02ab7211585e72e215405cd49c0712a8b4df.tar.gz
Merge pull request #1780 from AFLplusplus/dev
push to stable
Diffstat (limited to 'src/afl-cc.c')
-rw-r--r--src/afl-cc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/afl-cc.c b/src/afl-cc.c
index 9e56828c..58d44e5d 100644
--- a/src/afl-cc.c
+++ b/src/afl-cc.c
@@ -383,9 +383,11 @@ static u8 fortify_set = 0, asan_set = 0, x_set = 0, bit_mode = 0,
           have_o = 0, have_pic = 0, have_c = 0, partial_linking = 0,
           non_dash = 0;
 
+#define MAX_PARAMS_NUM 2048
+
 static void process_params(u32 argc, char **argv) {
 
-  if (cc_par_cnt + argc >= 1024) { FATAL("Too many command line parameters"); }
+  if (cc_par_cnt + argc >= MAX_PARAMS_NUM) { FATAL("Too many command line parameters, please increase MAX_PARAMS_NUM."); }
 
   if (lto_mode && argc > 1) {
 
@@ -679,7 +681,7 @@ static void process_params(u32 argc, char **argv) {
 
 static void edit_params(u32 argc, char **argv, char **envp) {
 
-  cc_params = ck_alloc(1024 * sizeof(u8 *));
+  cc_params = ck_alloc(MAX_PARAMS_NUM * sizeof(u8 *));
 
   if (lto_mode) {