diff --git a/src/main.cpp b/src/main.cpp index 4b3411a44..199d63755 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3464,6 +3464,11 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) // Track requests for our stuff Inventory(inv.hash); + + if (pfrom->nSendSize > (SendBufferSize() * 2)) { + pfrom->Misbehaving(50); + return error("send buffer size() = %"PRIszu"", pfrom->nSendSize); + } } }