Fixed TCP bug.

Packet was being copied with a wrong, smaller length.
This commit is contained in:
irungentoo 2014-07-15 13:39:32 -04:00
parent 078d60ab92
commit ae7a11cae9
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;