diff --git a/SMBLibrary/NTFileStore/Structures/FileInformation/Set/FileRenameInformationType2.cs b/SMBLibrary/NTFileStore/Structures/FileInformation/Set/FileRenameInformationType2.cs index 8af1921..9b1c534 100644 --- a/SMBLibrary/NTFileStore/Structures/FileInformation/Set/FileRenameInformationType2.cs +++ b/SMBLibrary/NTFileStore/Structures/FileInformation/Set/FileRenameInformationType2.cs @@ -1,18 +1,16 @@ -/* Copyright (C) 2014-2017 Tal Aloni . All rights reserved. +/* Copyright (C) 2014-2024 Tal Aloni . All rights reserved. * * You can redistribute this program and/or modify it under the terms of * the GNU Lesser Public License as published by the Free Software Foundation, * either version 3 of the License, or (at your option) any later version. */ using System; -using System.Collections.Generic; -using System.Text; using Utilities; namespace SMBLibrary { /// - /// [MS-FSCC] 2.4.34.2 - FileRenameInformation Type 2 + /// [MS-FSCC] 2.4.37.2 - FileRenameInformation Type 2 /// /// /// [MS-FSA] 2.1.5.14.11 @@ -28,6 +26,7 @@ namespace SMBLibrary public ulong RootDirectory; private uint FileNameLength; public string FileName = String.Empty; + // Padding - the number of bytes required to make the size of this structure at least 24. public FileRenameInformationType2() { @@ -62,7 +61,7 @@ namespace SMBLibrary { get { - return FixedLength + FileName.Length * 2; + return Math.Max(FixedLength + FileName.Length * 2, 24); } } }