diff options
author | Dominik Maier <domenukk@gmail.com> | 2020-03-28 00:44:52 +0100 |
---|---|---|
committer | Dominik Maier <domenukk@gmail.com> | 2020-04-01 13:10:05 +0200 |
commit | 5bd8aa489b9d9db4bb330a7515666ad11eab24b4 (patch) | |
tree | 232bd053fc6d3f77bde60baef6cf2620b812ac1c /include/alloc-inl.h | |
parent | e71c2937de8a19cf9b3627b86894cafabcd45513 (diff) | |
download | afl++-5bd8aa489b9d9db4bb330a7515666ad11eab24b4.tar.gz |
fixed leak
Diffstat (limited to 'include/alloc-inl.h')
-rw-r--r-- | include/alloc-inl.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/alloc-inl.h b/include/alloc-inl.h index 92d29c1e..ed1e0397 100644 --- a/include/alloc-inl.h +++ b/include/alloc-inl.h @@ -788,10 +788,12 @@ static inline void *ck_maybe_grow(void **buf, size_t *size, while (*size < size_needed) { *size *= 2; + if ((*size) < 0) FATAL("size_t overflow"); } *buf = ck_realloc(*buf, *size); + return *buf; } |