about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2023-06-26 23:07:49 +0300
committerGitHub <noreply@github.com>2023-06-26 23:07:49 +0300
commit7b1238b0f4d177976a4de5fa35182009da59cc45 (patch)
tree9855547b9d04eab5d62f5bcb86d4bf94828579ab /src
parentaaa1d113e7302d8b6d9959843c723bd18767eb4d (diff)
parent32d5ccb92dd3f646db327d2b7c1ec5fa74b4d656 (diff)
downloadafl++-7b1238b0f4d177976a4de5fa35182009da59cc45.tar.gz
Merge pull request #1786 from coc-cyqh/IncNumOfParams
Increase the number of afl-cc supported params
Diffstat (limited to 'src')
-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) {