From d4168c82bef0d86fd254a9d993906a09f5fd7fc0 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 9 Sep 2014 09:18:05 +0200 Subject: Limit CNode::mapAskFor Tighten resource constraints on CNode. --- src/net.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/net.cpp') diff --git a/src/net.cpp b/src/net.cpp index 2546826f9..6b7e62d7c 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2106,6 +2106,8 @@ CNode::~CNode() void CNode::AskFor(const CInv& inv) { + if (mapAskFor.size() > MAPASKFOR_MAX_SZ) + return; // We're using mapAskFor as a priority queue, // the key is the earliest time the request can be sent int64_t nRequestTime; -- cgit v1.2.3