mirror of
https://github.com/rapid7/metasploit-payloads
synced 2025-02-16 00:24:29 +01:00
Fix issue with packet size calculation
This commit fixes an issue where the transports were calculating an incorrect size for the packet that was being received. This wasn't noticable until packet pivot work started, and for some reason wasn't causing breakages during local testing. Either way, it's fixed now!
This commit is contained in:
parent
9bb22ad251
commit
fac1bfa489
@ -459,7 +459,7 @@ static DWORD packet_receive(Remote *remote, Packet **packet)
|
||||
|
||||
payloadLength = ntohl(header.length) - sizeof(TlvHeader);
|
||||
vdprintf("[TCP] Payload length is %d", payloadLength);
|
||||
DWORD packetSize = sizeof(PacketHeader) + payloadLength + sizeof(TlvHeader);
|
||||
DWORD packetSize = sizeof(PacketHeader) + payloadLength;
|
||||
vdprintf("[TCP] total buffer size for the packet is %d", packetSize);
|
||||
payloadBytesLeft = payloadLength;
|
||||
|
||||
|
@ -499,7 +499,7 @@ static DWORD packet_receive_http(Remote *remote, Packet **packet)
|
||||
|
||||
payloadLength = ntohl(header.length) - sizeof(TlvHeader);
|
||||
vdprintf("[REC HTTP] Payload length is %d", payloadLength);
|
||||
DWORD packetSize = sizeof(PacketHeader) + payloadLength + sizeof(TlvHeader);
|
||||
DWORD packetSize = sizeof(PacketHeader) + payloadLength;
|
||||
vdprintf("[REC HTTP] total buffer size for the packet is %d", packetSize);
|
||||
payloadBytesLeft = payloadLength;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user