mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-21 05:42:12 +00:00
if exponential growth is too much, don't doo it
This commit is contained in:
@ -788,7 +788,8 @@ static inline void *ck_maybe_grow(void **buf, size_t *size,
|
||||
while (*size < size_needed) {
|
||||
|
||||
*size *= 2;
|
||||
if ((*size) < 0) FATAL("size_t overflow");
|
||||
/* in case of overflow we'll realloc to size_needed */
|
||||
if ((*size) < 0) *size = size_needed;
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user