Skip to content

Commit a013f76

Browse files
committedJul 4, 2013
Throw exception instead of assert on nested reliable packets
Fixes a denial of service vulnerability, issue #784
1 parent 3f6f327 commit a013f76

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/connection.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1436,7 +1436,8 @@ SharedBuffer<u8> Connection::processPacket(Channel *channel,
14361436
else if(type == TYPE_RELIABLE)
14371437
{
14381438
// Recursive reliable packets not allowed
1439-
assert(reliable == false);
1439+
if(reliable)
1440+
throw InvalidIncomingDataException("Found nested reliable packets");
14401441

14411442
if(packetdata.getSize() < RELIABLE_HEADER_SIZE)
14421443
throw InvalidIncomingDataException

0 commit comments

Comments
 (0)
Please sign in to comment.