summaryrefslogtreecommitdiff
path: root/fs/ntfs3/inode.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2022-10-15 11:28:55 +0300
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2022-11-12 20:59:45 +0300
commit658015167a8432b88f5d032e9d85d8fd50e5bf2c (patch)
treefdcc0a72f8f78b52b77bcc29d8000907f0a5e8ef /fs/ntfs3/inode.c
parentd49436c34448e01eb6ab85413af87de73c99494d (diff)
downloadlinux-658015167a8432b88f5d032e9d85d8fd50e5bf2c.tar.xz
fs/ntfs3: Delete duplicate condition in ntfs_read_mft()
There were two patches which addressed the same bug and added the same condition: commit 6db620863f85 ("fs/ntfs3: Validate data run offset") commit 887bfc546097 ("fs/ntfs3: Fix slab-out-of-bounds read in run_unpack") Delete one condition. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs/ntfs3/inode.c')
-rw-r--r--fs/ntfs3/inode.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c
index 3977e98e3fa3..763dd982a43a 100644
--- a/fs/ntfs3/inode.c
+++ b/fs/ntfs3/inode.c
@@ -381,12 +381,6 @@ attr_unpack_run:
t64 = le64_to_cpu(attr->nres.svcn);
- /* offset to packed runs is out-of-bounds */
- if (roff > asize) {
- err = -EINVAL;
- goto out;
- }
-
err = run_unpack_ex(run, sbi, ino, t64, le64_to_cpu(attr->nres.evcn),
t64, Add2Ptr(attr, roff), asize - roff);
if (err < 0)