check I2NP message buffer size

This commit is contained in:
orignal 2016-01-05 14:29:18 -05:00
parent a26c5f85c3
commit ff48422ec0
4 changed files with 29 additions and 25 deletions

View file

@ -19,8 +19,8 @@ namespace transport
*newMsg = *msg;
msg = newMsg;
}
memcpy (msg->buf + msg->len, fragment, fragmentSize);
msg->len += fragmentSize;
if (msg->Concat (fragment, fragmentSize) < fragmentSize)
LogPrint (eLogError, "SSU: I2NP buffer overflow ", msg->maxLen);
nextFragmentNum++;
}