You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Fix possible buffer overflow in NetworkedMultiplayerENet
NetworkedMultiplayerENet::get_packet was reporting the wrong size for the packet buffer exposing a potential buffer overflow in case of malformed/malicious packets
This commit is contained in:
@@ -359,7 +359,7 @@ Error NetworkedMultiplayerENet::get_packet(const uint8_t **r_buffer,int &r_buffe
|
||||
incoming_packets.pop_front();
|
||||
|
||||
*r_buffer=(const uint8_t*)(¤t_packet.packet->data[12]);
|
||||
r_buffer_size=current_packet.packet->dataLength;
|
||||
r_buffer_size=current_packet.packet->dataLength-12;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user