1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-11-16 22:35:07 -05:00

Throw exception instead of assert on nested reliable packets

Fixes a denial of service vulnerability, issue #784
This commit is contained in:
Kahrl 2013-07-04 06:18:50 +02:00
parent 3f6f327cb9
commit a013f762c4

View File

@ -1436,7 +1436,8 @@ SharedBuffer<u8> Connection::processPacket(Channel *channel,
else if(type == TYPE_RELIABLE)
{
// Recursive reliable packets not allowed
assert(reliable == false);
if(reliable)
throw InvalidIncomingDataException("Found nested reliable packets");
if(packetdata.getSize() < RELIABLE_HEADER_SIZE)
throw InvalidIncomingDataException