diff options
Diffstat (limited to 'src/structured_values/file_name.rs')
-rw-r--r-- | src/structured_values/file_name.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/structured_values/file_name.rs b/src/structured_values/file_name.rs index ce7e376..06e3d2a 100644 --- a/src/structured_values/file_name.rs +++ b/src/structured_values/file_name.rs @@ -53,17 +53,16 @@ impl NtfsFileName { pub(crate) fn new<T>( attribute_position: u64, mut value_attached: NtfsAttributeValueAttached<'_, '_, T>, - value_length: u64, ) -> Result<Self> where T: Read + Seek, { - if value_length < FILE_NAME_MIN_SIZE { + if value_attached.len() < FILE_NAME_MIN_SIZE { return Err(NtfsError::InvalidAttributeSize { position: attribute_position, ty: NtfsAttributeType::FileName, expected: FILE_NAME_MIN_SIZE, - actual: value_length, + actual: value_attached.len(), }); } |