limit total length of user agent comments

Reworked-By: Wladimir J. van der Laan <laanwj@gmail.com>
This commit is contained in:
Pavol Rusnak
2015-07-31 18:05:42 +02:00
committed by Jack Grigg
parent 8c5e229ac9
commit 2bc62dc4e3
5 changed files with 16 additions and 4 deletions

View File

@@ -4768,7 +4768,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
if (!vRecv.empty())
vRecv >> addrFrom >> nNonce;
if (!vRecv.empty()) {
vRecv >> LIMITED_STRING(pfrom->strSubVer, 256);
vRecv >> LIMITED_STRING(pfrom->strSubVer, MAX_SUBVERSION_LENGTH);
pfrom->cleanSubVer = SanitizeString(pfrom->strSubVer);
}
if (!vRecv.empty())