From a145b172b45b0afa131f44e00dfd90e88088069b Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 25 Jul 2019 23:19:32 +0200 Subject: 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 --- lib/sqfs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqfs/super.c') 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; } -- cgit v1.2.3