mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed TCP bug.
Packet was being copied with a wrong, smaller length.
This commit is contained in:
parent
078d60ab92
commit
ae7a11cae9
|
@ -165,7 +165,7 @@ static int write_packet_TCP_secure_connection(TCP_Client_Connection *con, const
|
|||
if ((unsigned int)len == sizeof(packet))
|
||||
return 1;
|
||||
|
||||
memcpy(con->last_packet, packet, length);
|
||||
memcpy(con->last_packet, packet, sizeof(packet));
|
||||
con->last_packet_length = sizeof(packet);
|
||||
con->last_packet_sent = len;
|
||||
return 1;
|
||||
|
|
|
@ -345,7 +345,7 @@ static int write_packet_TCP_secure_connection(TCP_Secure_Connection *con, const
|
|||
if ((unsigned int)len == sizeof(packet))
|
||||
return 1;
|
||||
|
||||
memcpy(con->last_packet, packet, length);
|
||||
memcpy(con->last_packet, packet, sizeof(packet));
|
||||
con->last_packet_length = sizeof(packet);
|
||||
con->last_packet_sent = len;
|
||||
return 1;
|
||||
|
|
Loading…
Reference in New Issue
Block a user