summaryrefslogtreecommitdiff
path: root/lib/sqfs/super.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-25 23:19:32 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-25 23:22:50 +0200
commita145b172b45b0afa131f44e00dfd90e88088069b (patch)
tree6acecd3f7201e7d4613b06b40830af948f85016f /lib/sqfs/super.c
parentb0ed8c9a3ee74ff2ab428beaf42819d1d0974215 (diff)
Fix checks of super block block size
Make sure range is checked when reading a block and that the check is made correctly. Also make the block log check a little more strict. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/super.c')
-rw-r--r--lib/sqfs/super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqfs/super.c b/lib/sqfs/super.c
index d90e6ea..7a7f0da 100644
--- a/lib/sqfs/super.c
+++ b/lib/sqfs/super.c
@@ -19,7 +19,7 @@ int sqfs_super_init(sqfs_super_t *super, size_t block_size, uint32_t mtime,
return -1;
}
- if (block_size < 4096 || block_size >= (1 << 24)) {
+ if (block_size < 4096 || block_size >= (1 << 20)) {
fputs("Block size must be between 4k and 1M\n", stderr);
return -1;
}