From 6bb9aa323bbd6c6b2fa5055fe3594b414df3651c Mon Sep 17 00:00:00 2001 From: Tal Aloni Date: Thu, 2 Mar 2017 14:29:05 +0200 Subject: [PATCH] SMB2Header: Initalize Signature field on creation, added SignatureOffset constant --- SMBLibrary/SMB2/SMB2Header.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SMBLibrary/SMB2/SMB2Header.cs b/SMBLibrary/SMB2/SMB2Header.cs index 03fc916..9ff9714 100644 --- a/SMBLibrary/SMB2/SMB2Header.cs +++ b/SMBLibrary/SMB2/SMB2Header.cs @@ -12,6 +12,8 @@ namespace SMBLibrary.SMB2 public class SMB2Header { public const int Length = 64; + public const int SignatureOffset = 48; + public static readonly byte[] ProtocolSignature = new byte[] { 0xFE, 0x53, 0x4D, 0x42 }; public byte[] ProtocolId; // 4 bytes, 0xFE followed by "SMB" @@ -34,6 +36,7 @@ namespace SMBLibrary.SMB2 ProtocolId = ProtocolSignature; StructureSize = Length; Command = commandName; + Signature = new byte[16]; } public SMB2Header(byte[] buffer, int offset)