From: Kahrl Date: Thu, 4 Jul 2013 04:18:50 +0000 (+0200) Subject: Throw exception instead of assert on nested reliable packets X-Git-Tag: 0.4.8~353 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a013f762c4c9b39a1d143ee1b68e6d8e86dcee22;p=oweals%2Fminetest.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 b94df5e82..dd7ff597b 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