Fix bug in ntfs_inode_add_attr.

(Logical change 1.641)
edge.strict_endians
(none)!yura 2004-11-21 12:31:51 +00:00
parent 8b719cc327
commit 9c6cce1bf2
1 changed files with 2 additions and 1 deletions

View File

@ -973,7 +973,8 @@ ntfs_attr *ntfs_inode_add_attr(ntfs_inode *ni, ATTR_TYPES type,
}
add_attr_record:
if (attr_rec_size == offsetof(ATTR_RECORD, resident_end)) {
if (attr_rec_size == offsetof(ATTR_RECORD, resident_end) +
((name_len * sizeof(ntfschar) + 7) & ~7)) {
/* Add resident attribute. */
offset = ntfs_resident_attr_record_add(attr_ni, type, name,
name_len, 0);