projects
/
zefram
/
minetest
/
minetest_engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f6f327
)
Throw exception instead of assert on nested reliable packets
author
Kahrl
<kahrl@gmx.net>
Thu, 4 Jul 2013 04:18:50 +0000
(06:18 +0200)
committer
Kahrl
<kahrl@gmx.net>
Thu, 4 Jul 2013 04:18:50 +0000
(06:18 +0200)
Fixes a denial of service vulnerability, issue #784
src/connection.cpp
patch
|
blob
|
history
diff --git
a/src/connection.cpp
b/src/connection.cpp
index b94df5e82824e5a286990fd5c1ddeb7bdf3bbfd3..dd7ff597bea7686862fc2692c62c9b5e67c32994 100644
(file)
--- 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