summaryrefslogtreecommitdiff
path: root/super1.c
diff options
context:
space:
mode:
Diffstat (limited to 'super1.c')
-rw-r--r--super1.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/super1.c b/super1.c
index 9834594c..02d6c7a1 100644
--- a/super1.c
+++ b/super1.c
@@ -2105,6 +2105,10 @@ add_internal_bitmap1(struct supertype *st,
/* Limit to 128K of bitmap when chunk size not requested */
room = 128*2;
+ if (room <= 1)
+ /* No room for a bitmap */
+ return 0;
+
max_bits = (room * 512 - sizeof(bitmap_super_t)) * 8;
min_chunk = 4096; /* sub-page chunks don't work yet.. */