diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ntfs3/record.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ntfs3/record.c b/fs/ntfs3/record.c index 66eb11e0965e..a952cd7aa7a4 100644 --- a/fs/ntfs3/record.c +++ b/fs/ntfs3/record.c @@ -265,6 +265,11 @@ struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr) if (t16 + t32 > asize) return NULL; + if (attr->name_len && + le16_to_cpu(attr->name_off) + sizeof(short) * attr->name_len > t16) { + return NULL; + } + return attr; } |