summaryrefslogtreecommitdiff
path: root/fs/squashfs/xattr_id.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2021-07-05 09:05:31 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2021-07-05 09:05:31 +0300
commit818b26588994d9d95743fca0a427f08ec6c1c41d (patch)
tree870d9abed0e43b82257350a93e6517816815cd6c /fs/squashfs/xattr_id.c
parent45a4b68354ffccbc9ca71027bd34754ca24f5183 (diff)
parentf8f84af5da9ee04ef1d271528656dac42a090d00 (diff)
downloadlinux-818b26588994d9d95743fca0a427f08ec6c1c41d.tar.xz
Merge branch 'next' into for-linus
Prepare input updates for 5.14 merge window.
Diffstat (limited to 'fs/squashfs/xattr_id.c')
-rw-r--r--fs/squashfs/xattr_id.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/squashfs/xattr_id.c b/fs/squashfs/xattr_id.c
index ead66670b41a..087cab8c78f4 100644
--- a/fs/squashfs/xattr_id.c
+++ b/fs/squashfs/xattr_id.c
@@ -109,14 +109,16 @@ __le64 *squashfs_read_xattr_id_table(struct super_block *sb, u64 table_start,
start = le64_to_cpu(table[n]);
end = le64_to_cpu(table[n + 1]);
- if (start >= end || (end - start) > SQUASHFS_METADATA_SIZE) {
+ if (start >= end || (end - start) >
+ (SQUASHFS_METADATA_SIZE + SQUASHFS_BLOCK_OFFSET)) {
kfree(table);
return ERR_PTR(-EINVAL);
}
}
start = le64_to_cpu(table[indexes - 1]);
- if (start >= table_start || (table_start - start) > SQUASHFS_METADATA_SIZE) {
+ if (start >= table_start || (table_start - start) >
+ (SQUASHFS_METADATA_SIZE + SQUASHFS_BLOCK_OFFSET)) {
kfree(table);
return ERR_PTR(-EINVAL);
}