Browse Source

SMB2: WriteRequest: DataOffset field was set incorrectly in some cases

Tal Aloni 7 years ago
parent
commit
a0f8e0c19e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      SMBLibrary/SMB2/Commands/WriteRequest.cs

+ 1 - 1
SMBLibrary/SMB2/Commands/WriteRequest.cs

@@ -66,7 +66,7 @@ namespace SMBLibrary.SMB2
             DataLength = (uint)Data.Length;
             if (Data.Length > 0)
             {
-                DataOffset = (ushort)(WriteChannelInfoOffset + WriteChannelInfo.Length);
+                DataOffset = (ushort)(SMB2Header.Length + FixedSize + WriteChannelInfo.Length);
             }
             LittleEndianWriter.WriteUInt16(buffer, offset + 0, StructureSize);
             LittleEndianWriter.WriteUInt16(buffer, offset + 2, DataOffset);