aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2012-08-26 17:08:18 -0400
committerLuke Dashjr <luke-jr+git@utopios.org>2012-08-27 18:56:54 +0000
commite1c2163fb7b3f37932be9093cadd6cce250844a5 (patch)
tree001977dca177027e5367c394132e65c2313885da /src/main.h
parent2eaeb17fe16594313004c56450fcc1a698d50bb7 (diff)
downloadbitcoin-e1c2163fb7b3f37932be9093cadd6cce250844a5.tar.xz
Alert system DoS prevention
This fixes two alert system vulnerabilities found by Sergio Lerner; you could send peers unlimited numbers of invalid alert message to try to either fill up their debug.log with messages and/or keep their CPU busy checking signatures. Fixed by disconnecting/banning peers if they send 10 or more bad (invalid/expired/cancelled) alerts.
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.h b/src/main.h
index 7a8e2d45cf..b7d47cfdfd 100644
--- a/src/main.h
+++ b/src/main.h
@@ -1577,7 +1577,7 @@ public:
uint256 GetHash() const
{
- return SerializeHash(*this);
+ return Hash(this->vchMsg.begin(), this->vchMsg.end());
}
bool IsInEffect() const