about summary refs log tree commit diff
path: root/include/alloc-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/alloc-inl.h')
-rw-r--r--include/alloc-inl.h3
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;
 
   }