mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-08-16 04:03:47 +02:00
SMB2: NegotiateResponse: Bugfix: NegotiateContext was not read from the correct position for non-zero offset
This commit is contained in:
parent
6f4a0c1c9f
commit
1485c365d5
1 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
/* Copyright (C) 2017-2024 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||||
*
|
*
|
||||||
* You can redistribute this program and/or modify it under the terms of
|
* You can redistribute this program and/or modify it under the terms of
|
||||||
* the GNU Lesser Public License as published by the Free Software Foundation,
|
* the GNU Lesser Public License as published by the Free Software Foundation,
|
||||||
|
@ -58,7 +58,7 @@ namespace SMBLibrary.SMB2
|
||||||
SecurityBufferLength = LittleEndianConverter.ToUInt16(buffer, offset + SMB2Header.Length + 58);
|
SecurityBufferLength = LittleEndianConverter.ToUInt16(buffer, offset + SMB2Header.Length + 58);
|
||||||
NegotiateContextOffset = LittleEndianConverter.ToUInt32(buffer, offset + SMB2Header.Length + 60);
|
NegotiateContextOffset = LittleEndianConverter.ToUInt32(buffer, offset + SMB2Header.Length + 60);
|
||||||
SecurityBuffer = ByteReader.ReadBytes(buffer, offset + SecurityBufferOffset, SecurityBufferLength);
|
SecurityBuffer = ByteReader.ReadBytes(buffer, offset + SecurityBufferOffset, SecurityBufferLength);
|
||||||
NegotiateContextList = NegotiateContext.ReadNegotiateContextList(buffer, (int)NegotiateContextOffset, NegotiateContextCount);
|
NegotiateContextList = NegotiateContext.ReadNegotiateContextList(buffer, offset + (int)NegotiateContextOffset, NegotiateContextCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void WriteCommandBytes(byte[] buffer, int offset)
|
public override void WriteCommandBytes(byte[] buffer, int offset)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue