diff options
author | Dominik Maier <domenukk@gmail.com> | 2020-03-28 05:01:01 +0100 |
---|---|---|
committer | Dominik Maier <domenukk@gmail.com> | 2020-04-01 13:10:05 +0200 |
commit | e59282fe2090445ea22bc5826845251e30e3799f (patch) | |
tree | d30bb7ae74bd445018016199a3e803fb105c2554 /include/alloc-inl.h | |
parent | 9785b15ed264951b006093f9ee4564820c153593 (diff) | |
download | afl++-e59282fe2090445ea22bc5826845251e30e3799f.tar.gz |
if exponential growth is too much, don't doo it
Diffstat (limited to 'include/alloc-inl.h')
-rw-r--r-- | include/alloc-inl.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/alloc-inl.h b/include/alloc-inl.h index ed1e0397..99a83413 100644 --- a/include/alloc-inl.h +++ b/include/alloc-inl.h @@ -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; } |