projects
/
linux-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fs/ntfs3: Fixed overflow check in mi_enum_attr()
[linux-block.git]
/
fs
/
ntfs3
/
record.c
diff --git
a/fs/ntfs3/record.c
b/fs/ntfs3/record.c
index 7b6423584eaeeaf2fb75aff41c0c9429d4049eaf..6aa3a9d44df1bdc90f56a947caf94c902590d983 100644
(file)
--- a/
fs/ntfs3/record.c
+++ b/
fs/ntfs3/record.c
@@
-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;