Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13115361
D9094.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
855 B
Subscribers
None
D9094.diff
View Options
diff --git a/src/net.cpp b/src/net.cpp
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -16,6 +16,7 @@
#include <crypto/sha256.h>
#include <netbase.h>
#include <node/ui_interface.h>
+#include <protocol.h>
#include <random.h>
#include <scheduler.h>
#include <util/strencodings.h>
@@ -675,14 +676,14 @@
int V1TransportDeserializer::readHeader(const Config &config, const char *pch,
uint32_t nBytes) {
// copy data to temporary parsing buffer
- uint32_t nRemaining = 24 - nHdrPos;
+ uint32_t nRemaining = CMessageHeader::HEADER_SIZE - nHdrPos;
uint32_t nCopy = std::min(nRemaining, nBytes);
memcpy(&hdrbuf[nHdrPos], pch, nCopy);
nHdrPos += nCopy;
// if header incomplete, exit
- if (nHdrPos < 24) {
+ if (nHdrPos < CMessageHeader::HEADER_SIZE) {
return nCopy;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 1, 10:57 (16 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5187429
Default Alt Text
D9094.diff (855 B)
Attached To
D9094: net: use CMessageHeader::HEADER_SIZE, add missing include
Event Timeline
Log In to Comment