From 864cf7232e397353684445e614802ef25a993282 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Thu, 20 Oct 2011 19:05:27 +0200 Subject: [PATCH] Fixed huge data writes When computing the runlist for the first non-resident write to an attribute, an inconsistency was created between the attribute image and the ntfs_attr structure, which could cause an MFT record overflow when the first write is huge and fragmented (reported by Vito Caputo). --- libntfs-3g/attrib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libntfs-3g/attrib.c b/libntfs-3g/attrib.c index 14a2efcd..281a6205 100644 --- a/libntfs-3g/attrib.c +++ b/libntfs-3g/attrib.c @@ -5468,6 +5468,7 @@ static int ntfs_attr_update_meta(ATTR_RECORD *a, ntfs_attr *na, MFT_RECORD *m, NAttrClearSparse(na); a->flags &= ~ATTR_IS_SPARSE; + na->data_flags = a->flags; a->compression_unit = 0; memmove((u8*)a + le16_to_cpu(a->name_offset) - 8,