mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-04-30 02:37:49 +02:00
Fix: Incorrect CommandLength calculation in NegotiateResponse
The SecurityBufferLength was used in the CommandLength calculation of NegotiateResponse, but it hadn't been assigned a value when creating the buffer length. Instead, SecurityBuffer.Length should be directly used. This change ensures the accurate calculation of the CommandLength and resolves the related issues.
This commit is contained in:
parent
d40699d6dd
commit
ca132ffe6e
1 changed files with 1 additions and 1 deletions
|
@ -105,7 +105,7 @@ namespace SMBLibrary.SMB2
|
|||
}
|
||||
else
|
||||
{
|
||||
int paddedSecurityBufferLength = (int)Math.Ceiling((double)SecurityBufferLength / 8) * 8;
|
||||
int paddedSecurityBufferLength = (int)Math.Ceiling((double)SecurityBuffer.Length / 8) * 8;
|
||||
return FixedSize + paddedSecurityBufferLength + NegotiateContext.GetNegotiateContextListLength(NegotiateContextList);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue