Skip to content

Commit dd34665

Browse files
Dan Carpentergregkh
authored andcommitted
fs/ntfs3: Delete duplicate condition in ntfs_read_mft()
[ Upstream commit 6580151 ] There were two patches which addressed the same bug and added the same condition: commit 6db6208 ("fs/ntfs3: Validate data run offset") commit 887bfc5 ("fs/ntfs3: Fix slab-out-of-bounds read in run_unpack") Delete one condition. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Konstantin Komarov <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent a9847a1 commit dd34665

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

fs/ntfs3/inode.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -374,12 +374,6 @@ static struct inode *ntfs_read_mft(struct inode *inode,
374374

375375
t64 = le64_to_cpu(attr->nres.svcn);
376376

377-
/* offset to packed runs is out-of-bounds */
378-
if (roff > asize) {
379-
err = -EINVAL;
380-
goto out;
381-
}
382-
383377
err = run_unpack_ex(run, sbi, ino, t64, le64_to_cpu(attr->nres.evcn),
384378
t64, Add2Ptr(attr, roff), asize - roff);
385379
if (err < 0)

0 commit comments

Comments
 (0)