mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 19:27:49 +02:00
fixed incorrect lenght
This commit is contained in:
parent
f7728aa1f6
commit
5cc84133e3
1 changed files with 2 additions and 6 deletions
|
@ -648,14 +648,10 @@ namespace transport
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
i2p::crypto::Siphash<8> (m_ReceiveIV, m_ReceiveIV, 8, m_ReceiveSipKey);
|
i2p::crypto::Siphash<8> (m_ReceiveIV, m_ReceiveIV, 8, m_ReceiveSipKey);
|
||||||
uint16_t oldLen = m_NextReceivedLen;
|
|
||||||
m_NextReceivedLen = be16toh (m_NextReceivedLen ^ bufbe16toh(m_ReceiveIV));
|
m_NextReceivedLen = be16toh (m_NextReceivedLen ^ bufbe16toh(m_ReceiveIV));
|
||||||
LogPrint (eLogDebug, "NTCP2: received length ", m_NextReceivedLen);
|
LogPrint (eLogDebug, "NTCP2: received length ", m_NextReceivedLen);
|
||||||
if (m_NextReceivedLen > oldLen)
|
delete[] m_NextReceivedBuffer;
|
||||||
{
|
m_NextReceivedBuffer = new uint8_t[m_NextReceivedLen];
|
||||||
delete[] m_NextReceivedBuffer;
|
|
||||||
m_NextReceivedBuffer = new uint8_t[m_NextReceivedLen];
|
|
||||||
}
|
|
||||||
Receive ();
|
Receive ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue