aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqfs/super.c')
-rw-r--r--lib/sqfs/super.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sqfs/super.c b/lib/sqfs/super.c
index 0257453..470c06a 100644
--- a/lib/sqfs/super.c
+++ b/lib/sqfs/super.c
@@ -20,7 +20,10 @@ int sqfs_super_init(sqfs_super_t *super, size_t block_size, sqfs_u32 mtime,
if (block_size & (block_size - 1))
return SQFS_ERROR_SUPER_BLOCK_SIZE;
- if (block_size < 4096 || block_size > (1 << 20))
+ if (block_size < SQFS_MIN_BLOCK_SIZE)
+ return SQFS_ERROR_SUPER_BLOCK_SIZE;
+
+ if (block_size > SQFS_MAX_BLOCK_SIZE)
return SQFS_ERROR_SUPER_BLOCK_SIZE;
memset(super, 0, sizeof(*super));