From 1be6deedaf15245627cbad591ae347203a5e73b0 Mon Sep 17 00:00:00 2001 From: "flatcap.org!ntfs" Date: Tue, 10 Aug 2004 10:45:07 +0000 Subject: [PATCH] deltaxcn will only go as high as (max_cluster-1) so the comparisons below were off by one (Logical change 1.485) --- libntfs/runlist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libntfs/runlist.c b/libntfs/runlist.c index b1a09b46..369ea3a6 100644 --- a/libntfs/runlist.c +++ b/libntfs/runlist.c @@ -888,9 +888,9 @@ mpa_err: if (!attr->lowest_vcn) { VCN max_cluster; - max_cluster = (sle64_to_cpu(attr->allocated_size) + + max_cluster = ((sle64_to_cpu(attr->allocated_size) + vol->cluster_size - 1) >> - vol->cluster_size_bits; + vol->cluster_size_bits) - 1; /* * A highest_vcn of zero means this is a single extent * attribute so simply terminate the runlist with LCN_ENOENT).