Просмотр исходного кода

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

Tal Aloni 7 лет назад
Родитель
Сommit
a0f8e0c19e
1 измененных файлов с 1 добавлено и 1 удалено
  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);