From 48ab100d946850bdf373c67c4a532bcb54fa7253 Mon Sep 17 00:00:00 2001 From: "(none)!yura" <(none)!yura> Date: Mon, 11 Oct 2004 19:19:58 +0000 Subject: [PATCH] fix bug in ntfs_attr_make_non_resident (Logical change 1.605) --- libntfs/attrib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libntfs/attrib.c b/libntfs/attrib.c index 5e3ec391..a38e10d4 100644 --- a/libntfs/attrib.c +++ b/libntfs/attrib.c @@ -3066,7 +3066,7 @@ static int ntfs_attr_make_non_resident(ntfs_attr *na, } /* Calculate new offsets for the name and the mapping pairs array. */ name_ofs = (sizeof(ATTR_REC) - sizeof(a->compressed_size) + 7) & ~7; - mp_ofs = (name_ofs + a->name_length + 7) & ~7; + mp_ofs = (name_ofs + a->name_length * sizeof(ntfschar) + 7) & ~7; /* * Determine the size of the resident part of the non-resident * attribute record. (Not compressed thus no compressed_size element