diff options
-rw-r--r-- | fs/ntfs3/inode.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c index b1832b482c17..8b6fa7cd2784 100644 --- a/fs/ntfs3/inode.c +++ b/fs/ntfs3/inode.c @@ -129,6 +129,9 @@ next_attr: rsize = attr->non_res ? 0 : le32_to_cpu(attr->res.data_size); asize = le32_to_cpu(attr->size); + if (le16_to_cpu(attr->name_off) + attr->name_len > asize) + goto out; + switch (attr->type) { case ATTR_STD: if (attr->non_res || |