Commit 65801516 authored by Dan Carpenter's avatar Dan Carpenter Committed by Konstantin Komarov

fs/ntfs3: Delete duplicate condition in ntfs_read_mft()

There were two patches which addressed the same bug and added the same
condition:

commit 6db62086 ("fs/ntfs3: Validate data run offset")
commit 887bfc54 ("fs/ntfs3: Fix slab-out-of-bounds read in run_unpack")

Delete one condition.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
parent d49436c3
...@@ -381,12 +381,6 @@ static struct inode *ntfs_read_mft(struct inode *inode, ...@@ -381,12 +381,6 @@ static struct inode *ntfs_read_mft(struct inode *inode,
t64 = le64_to_cpu(attr->nres.svcn); 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), err = run_unpack_ex(run, sbi, ino, t64, le64_to_cpu(attr->nres.evcn),
t64, Add2Ptr(attr, roff), asize - roff); t64, Add2Ptr(attr, roff), asize - roff);
if (err < 0) if (err < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment