summaryrefslogtreecommitdiff
path: root/node/Node.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2016-09-09 08:43:58 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2016-09-09 08:43:58 -0700
commit0d4109a9f1f119e336d73039251ad17c0e2a56f4 (patch)
tree7dbed18275342042878db41b7b7484bfb9afa5a1 /node/Node.cpp
parent16df2c33631eeb3e123fefa4febf20f202fd476b (diff)
downloadinfinitytier-0d4109a9f1f119e336d73039251ad17c0e2a56f4.tar.gz
infinitytier-0d4109a9f1f119e336d73039251ad17c0e2a56f4.zip
More refactoring to clean up code, and add a gate function to make sure we do not handle OK packets we did not expect. This hardens up a few potential edge cases around security, since such messages might be used to e.g. pollute a cache and DOS under certain conditions.
Diffstat (limited to 'node/Node.cpp')
-rw-r--r--node/Node.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/node/Node.cpp b/node/Node.cpp
index 415385f7..e8279c62 100644
--- a/node/Node.cpp
+++ b/node/Node.cpp
@@ -75,6 +75,9 @@ Node::Node(
{
_online = false;
+ memset(_expectingRepliesToBucketPtr,0,sizeof(_expectingRepliesToBucketPtr));
+ memset(_expectingRepliesTo,0,sizeof(_expectingRepliesTo));
+
// Use Salsa20 alone as a high-quality non-crypto PRNG
{
char foo[32];