Skip to content

Commit

Permalink
Throw exception instead of assert on nested reliable packets
Browse files Browse the repository at this point in the history
Fixes a denial of service vulnerability, issue #784
  • Loading branch information
kahrl committed Jul 4, 2013
1 parent 3f6f327 commit a013f76
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/connection.cpp
Expand Up @@ -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
Expand Down

0 comments on commit a013f76

Please sign in to comment.