summaryrefslogtreecommitdiff
path: root/shallow.c
diff options
context:
space:
mode:
Diffstat (limited to 'shallow.c')
-rw-r--r--shallow.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/shallow.c b/shallow.c
index 91aa59d4b8..7d5ea0cd39 100644
--- a/shallow.c
+++ b/shallow.c
@@ -369,6 +369,9 @@ static uint32_t *paint_alloc(struct paint_info *info)
unsigned size = nr * sizeof(uint32_t);
void *p;
if (!info->pool_count || info->free + size > info->end) {
+ if (size > POOL_SIZE)
+ die("BUG: pool size too small for %d in paint_alloc()",
+ size);
info->pool_count++;
REALLOC_ARRAY(info->pools, info->pool_count);
info->free = xmalloc(POOL_SIZE);