summaryrefslogtreecommitdiffstats
path: root/fs/omfs/omfs_fs.h
diff options
context:
space:
mode:
authorBob Copeland <me@bobcopeland.com>2010-07-06 17:16:46 +0200
committerBob Copeland <me@bobcopeland.com>2010-07-10 20:38:11 +0200
commit8800a044c71a128633cf3febaf4780531a991334 (patch)
treeb736cdc086d86f27e1b52efa96f2a3f15fe1d443 /fs/omfs/omfs_fs.h
parentomfs: refuse to mount if bitmap pointer is obviously wrong (diff)
downloadlinux-8800a044c71a128633cf3febaf4780531a991334.tar.xz
linux-8800a044c71a128633cf3febaf4780531a991334.zip
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>
Diffstat (limited to 'fs/omfs/omfs_fs.h')
-rw-r--r--fs/omfs/omfs_fs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/omfs/omfs_fs.h b/fs/omfs/omfs_fs.h
index 12cca245d6e8..ee5e4327de92 100644
--- a/fs/omfs/omfs_fs.h
+++ b/fs/omfs/omfs_fs.h
@@ -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];