mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
fs/ntfs3: Fixed overflow check in mi_enum_attr()
Reported-by: Robert Morris <rtm@csail.mit.edu> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
This commit is contained in:
parent
1b7dd28e14
commit
652cfeb43d
@ -279,7 +279,7 @@ struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr)
|
||||
if (t16 > asize)
|
||||
return NULL;
|
||||
|
||||
if (t16 + le32_to_cpu(attr->res.data_size) > asize)
|
||||
if (le32_to_cpu(attr->res.data_size) > asize - t16)
|
||||
return NULL;
|
||||
|
||||
t32 = sizeof(short) * attr->name_len;
|
||||
|
Loading…
Reference in New Issue
Block a user