Commit 5ce5ff9f authored by Anton Altaparmakov's avatar Anton Altaparmakov

NTFS: Fix off by one error in ntfs_get_parent().

parent 43340575
......@@ -390,7 +390,7 @@ struct dentry *ntfs_get_parent(struct dentry *child_dent)
goto try_next;
fn = (FILE_NAME_ATTR *)((u8 *)attr +
le16_to_cpu(attr->data.resident.value_offset));
if (unlikely((u8 *)fn + le32_to_cpu(attr->data.resident.value_length) >=
if (unlikely((u8 *)fn + le32_to_cpu(attr->data.resident.value_length) >
(u8*)attr + le32_to_cpu(attr->length)))
goto try_next;
/* Get the inode number of the parent directory. */
......
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