about summary refs log tree commit diff
path: root/examples/argv_fuzzing/argv-fuzz-inl.h
diff options
context:
space:
mode:
authorAndrea Fioraldi <andreafioraldi@gmail.com>2020-02-13 20:04:59 +0100
committerAndrea Fioraldi <andreafioraldi@gmail.com>2020-02-13 20:04:59 +0100
commited5a3e92ff73c81e5760c4150078fac0777c36fa (patch)
treeebd6386d6f7b998f86341ff5ddf769fbe88f0f17 /examples/argv_fuzzing/argv-fuzz-inl.h
parent5c35f3dbd125338b393ba0bcebfd0234c57719b7 (diff)
parentafb23f09cf921d54ef9d11d5fa2a219f824ee025 (diff)
downloadafl++-ed5a3e92ff73c81e5760c4150078fac0777c36fa.tar.gz
Merge branch 'master' of github.com:vanhauser-thc/AFLplusplus
Diffstat (limited to 'examples/argv_fuzzing/argv-fuzz-inl.h')
-rw-r--r--examples/argv_fuzzing/argv-fuzz-inl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/argv_fuzzing/argv-fuzz-inl.h b/examples/argv_fuzzing/argv-fuzz-inl.h
index 4d880020..5644f7e4 100644
--- a/examples/argv_fuzzing/argv-fuzz-inl.h
+++ b/examples/argv_fuzzing/argv-fuzz-inl.h
@@ -53,7 +53,7 @@
   } while (0)
 
 #define MAX_CMDLINE_LEN 100000
-#define MAX_CMDLINE_PAR 1000
+#define MAX_CMDLINE_PAR  50000
 
 static char** afl_init_argv(int* argc) {
 
@@ -65,7 +65,7 @@ static char** afl_init_argv(int* argc) {
 
   if (read(0, in_buf, MAX_CMDLINE_LEN - 2) < 0) {}
 
-  while (*ptr) {
+  while (*ptr && rc < MAX_CMDLINE_PAR) {
 
     ret[rc] = ptr;
     if (ret[rc][0] == 0x02 && !ret[rc][1]) ret[rc]++;