From d7d65f0ef2cb0eb6301304f8348f76bacf9a3a0b Mon Sep 17 00:00:00 2001 From: Tal Aloni Date: Sat, 3 Aug 2024 13:50:39 +0300 Subject: [PATCH] SMB2: EncryptionCapabilities.GetBytes: Bugfix: Corrected Data length computation --- .../SMB2/Structures/NegotiateContext/EncryptionCapabilities.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SMBLibrary/SMB2/Structures/NegotiateContext/EncryptionCapabilities.cs b/SMBLibrary/SMB2/Structures/NegotiateContext/EncryptionCapabilities.cs index cdd3585..21124fb 100644 --- a/SMBLibrary/SMB2/Structures/NegotiateContext/EncryptionCapabilities.cs +++ b/SMBLibrary/SMB2/Structures/NegotiateContext/EncryptionCapabilities.cs @@ -32,7 +32,7 @@ namespace SMBLibrary.SMB2 public byte[] GetBytes() { - int length = 2 * Ciphers.Count * 2; + int length = 2 + Ciphers.Count * 2; byte[] buffer = new byte[length]; LittleEndianWriter.WriteUInt16(buffer, 0, (ushort)Ciphers.Count); for (int index = 0; index < Ciphers.Count; index++)