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