mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
#343. check for malformed messages
This commit is contained in:
parent
4ced1e5075
commit
64b2a32c9a
5 changed files with 38 additions and 11 deletions
|
@ -199,7 +199,7 @@ namespace data
|
|||
}
|
||||
memcpy (&m_StandardIdentity, buf, DEFAULT_IDENTITY_SIZE);
|
||||
|
||||
delete[] m_ExtendedBuffer;
|
||||
delete[] m_ExtendedBuffer; m_ExtendedBuffer = nullptr;
|
||||
m_ExtendedLen = bufbe16toh (m_StandardIdentity.certificate + 1);
|
||||
if (m_ExtendedLen)
|
||||
{
|
||||
|
@ -211,6 +211,7 @@ namespace data
|
|||
else
|
||||
{
|
||||
LogPrint (eLogError, "Identity: Certificate length ", m_ExtendedLen, " exceeds buffer length ", len - DEFAULT_IDENTITY_SIZE);
|
||||
m_ExtendedLen = 0;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue