aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
-rw-r--r--allocate.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/allocate.c b/allocate.c
index 0cc55630..152fa896 100644
--- a/allocate.c
+++ b/allocate.c
@@ -103,6 +103,8 @@ void *allocate(struct allocator_struct *desc, unsigned int size)
struct allocation_blob *newblob = blob_alloc(chunking);
if (!newblob)
die("out of memory");
+ if (size > chunking)
+ die("alloc too big");
desc->total_bytes += chunking;
newblob->next = blob;
blob = newblob;