From 9c6cce1bf2c897d0828ee47a21f3b818e6595c97 Mon Sep 17 00:00:00 2001 From: "(none)!yura" <(none)!yura> Date: Sun, 21 Nov 2004 12:31:51 +0000 Subject: [PATCH] Fix bug in ntfs_inode_add_attr. (Logical change 1.641) --- libntfs/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libntfs/inode.c b/libntfs/inode.c index 3ab66997..841b873a 100644 --- a/libntfs/inode.c +++ b/libntfs/inode.c @@ -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);