mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-16 03:48:08 +00:00
afl-as.c, fix compiler warnings (overflowing is UB)
This commit is contained in:
@ -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");
|
||||
|
||||
|
Reference in New Issue
Block a user