mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-08-02 22:11:50 +02:00
Fix: Incorrect CommandLength calculation in NegotiateResponse (#298)
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. Co-authored-by: 胡正 <zheng@sharecreators.com>
This commit is contained in:
parent
d40699d6dd
commit
351f23ead9
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
Add a link
Reference in a new issue