recv_packet: fix reported packet size on abnormal payloads
This commit is contained in:
@@ -150,6 +150,7 @@ int recv_packet(int sockfd, rcon_packet_t *packet) {
|
||||
}
|
||||
packet->body[body_size] = '\0';
|
||||
} else {
|
||||
packet->size = sizeof(int32_t) * 2 + 2;
|
||||
packet->body[0] = '\0';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user