diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-29 05:05:54 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-29 05:05:54 +0400 |
commit | 8563f8786ee389c7861938d1d25336706f6de187 (patch) | |
tree | aba82cbaa5111ec9a55b5e25add4fdb7100f6720 /fs/squashfs/namei.c | |
parent | 532bfc851a7475fb6a36c1e953aa395798a7cca7 (diff) | |
parent | 4b0180a49f08dd1c681cdc99edc9e0cec0a833fa (diff) | |
download | linux-8563f8786ee389c7861938d1d25336706f6de187.tar.xz |
Merge tag 'squashfs-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-next
Pull squashfs updates from Phillip Lougher:
"Add an extra mount time sanity check, plus some code cleanups and bug
fixes."
* tag 'squashfs-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-next:
Squashfs: add mount time sanity check for block_size and block_log match
Squashfs: fix f_pos check in get_dir_index_using_offset
Squashfs: get rid of obsolete definitions in header file
Squashfs: remove redundant length initialisation in squashfs_lookup
Squashfs: remove redundant length initialisation in squashfs_readdir
Squashfs: update comment removing reference to zlib only
Squashfs: use define instead of constant
Diffstat (limited to 'fs/squashfs/namei.c')
-rw-r--r-- | fs/squashfs/namei.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/squashfs/namei.c b/fs/squashfs/namei.c index 0682b38d7e31..abcc58f3c152 100644 --- a/fs/squashfs/namei.c +++ b/fs/squashfs/namei.c @@ -144,7 +144,7 @@ static struct dentry *squashfs_lookup(struct inode *dir, struct dentry *dentry, struct squashfs_dir_entry *dire; u64 block = squashfs_i(dir)->start + msblk->directory_table; int offset = squashfs_i(dir)->offset; - int err, length = 0, dir_count, size; + int err, length, dir_count, size; TRACE("Entered squashfs_lookup [%llx:%x]\n", block, offset); @@ -177,8 +177,7 @@ static struct dentry *squashfs_lookup(struct inode *dir, struct dentry *dentry, dir_count = le32_to_cpu(dirh.count) + 1; - /* dir_count should never be larger than 256 */ - if (dir_count > 256) + if (dir_count > SQUASHFS_DIR_COUNT) goto data_error; while (dir_count--) { |