about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2020-12-12 19:30:56 +0100
committerhexcoder- <heiko@hexco.de>2020-12-12 19:30:56 +0100
commit7382cf5f00c1ba5d926c12e3ed4ca0e14d761fcb (patch)
tree7223ad7c5414937f56757a54b00264b854440861 /src
parent109560e73afe66c782f91e5dd3d3e530fd16241d (diff)
downloadafl++-7382cf5f00c1ba5d926c12e3ed4ca0e14d761fcb.tar.gz
afl-as.c, fix compiler warnings (overflowing is UB)
Diffstat (limited to 'src')
-rw-r--r--src/afl-as.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/afl-as.c b/src/afl-as.c
index 2171bb58..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,7 +132,7 @@ static void edit_params(int argc, char **argv) {
   if (!tmp_dir) { tmp_dir = "/tmp"; }
 
   as_params = ck_alloc((argc + 32) * sizeof(u8 *));
-  if (unlikely((argc + 32) < argc || !as_params)) {
+  if (unlikely((INT_MAX - 32) < argc || !as_params)) {
 
     FATAL("Too many parameters passed to as");