Skip to content

Commit 6580151

Browse files
Dan Carpenteraalexandrovich
authored andcommitted
fs/ntfs3: Delete duplicate condition in ntfs_read_mft()
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]>
1 parent d49436c commit 6580151

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
@@ -381,12 +381,6 @@ static struct inode *ntfs_read_mft(struct inode *inode,
381381

382382
t64 = le64_to_cpu(attr->nres.svcn);
383383

384-
/* offset to packed runs is out-of-bounds */
385-
if (roff > asize) {
386-
err = -EINVAL;
387-
goto out;
388-
}
389-
390384
err = run_unpack_ex(run, sbi, ino, t64, le64_to_cpu(attr->nres.evcn),
391385
t64, Add2Ptr(attr, roff), asize - roff);
392386
if (err < 0)

0 commit comments

Comments
 (0)