diff options
author | Colin Finck <colin@reactos.org> | 2021-06-04 13:06:21 +0300 |
---|---|---|
committer | Colin Finck <colin@reactos.org> | 2021-06-04 13:06:21 +0300 |
commit | c3a4f05cfe3bf69d683c0c27a3f50f7b9af5a273 (patch) | |
tree | 6f36da9aa1c9baa91d326862755041a2808b38f7 /src/error.rs | |
parent | 2410b41bbf633bb136364cce63f631a2e219a76d (diff) |
Fix reading LCN positions of data runs of non-resident attributes.
The LCN offset of a data run is relative to the previous one.
We need to read it as a _signed_ variable-length integer and turn it into an absolute LCN position.
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs index 25dd00a..2d34537 100644 --- a/src/error.rs +++ b/src/error.rs @@ -24,6 +24,9 @@ pub enum NtfsError { expected: u8, actual: u8, }, + /// An invalid LCN position {lcn_position} was calculated from the NTFS data run header at + /// byte position {position:#010x} (and previous data runs) + InvalidLcnPositionInDataRunHeader { position: u64, lcn_position: i64 }, /// The requested NTFS file {n} is invalid InvalidNtfsFile { n: u64 }, /// The NTFS file at byte position {position:#010x} should have signature {expected:?}, but it has signature {actual:?} |