From: Kahrl Date: Thu, 4 Jul 2013 04:18:50 +0000 (+0200) Subject: Throw exception instead of assert on nested reliable packets X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=a013f762c4c9b39a1d143ee1b68e6d8e86dcee22;p=zefram%2Fminetest%2Fminetest_engine.git Throw exception instead of assert on nested reliable packets Fixes a denial of service vulnerability, issue #784 --- diff --git a/src/connection.cpp b/src/connection.cpp index b94df5e8..dd7ff597 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -1436,7 +1436,8 @@ SharedBuffer 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