diff options
author | Kahrl <kahrl@gmx.net> | 2013-07-04 06:18:50 +0200 |
---|---|---|
committer | Kahrl <kahrl@gmx.net> | 2013-07-04 06:18:50 +0200 |
commit | a013f762c4c9b39a1d143ee1b68e6d8e86dcee22 (patch) | |
tree | 928330126fd3150faa1e7e41e5dc60d66173d650 | |
parent | 3f6f327cb97662eb95e20f62650abcfac6bce3ab (diff) | |
download | minetest-a013f762c4c9b39a1d143ee1b68e6d8e86dcee22.tar.gz minetest-a013f762c4c9b39a1d143ee1b68e6d8e86dcee22.tar.bz2 minetest-a013f762c4c9b39a1d143ee1b68e6d8e86dcee22.zip |
Throw exception instead of assert on nested reliable packets
Fixes a denial of service vulnerability, issue #784
-rw-r--r-- | src/connection.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/connection.cpp b/src/connection.cpp index b94df5e82..dd7ff597b 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -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 |