omfs: sanity check cluster size
A corrupt filesystem could have a bad cluster size; this could result in the filesystem allocating too much space for files if too large, or getting stuck in omfs_allocate_block if too small. The proper range is 1-8 blocks. Reported-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Bob Copeland <me@bobcopeland.com>
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#define OMFS_EXTENT_CONT 0x40
|
||||
#define OMFS_XOR_COUNT 19
|
||||
#define OMFS_MAX_BLOCK_SIZE 8192
|
||||
#define OMFS_MAX_CLUSTER_SIZE 8
|
||||
|
||||
struct omfs_super_block {
|
||||
char s_fill1[256];
|
||||
|
مرجع در شماره جدید
Block a user