Browse Source

correct LeaseSet message size

pull/503/head
orignal 9 years ago
parent
commit
57bb0da1d6
  1. 2
      LeaseSet.cpp

2
LeaseSet.cpp

@ -202,7 +202,7 @@ namespace data @@ -202,7 +202,7 @@ namespace data
if (num > MAX_NUM_LEASES) num = MAX_NUM_LEASES;
// identity
auto signingKeyLen = m_Identity->GetSigningPublicKeyLen ();
m_BufferLen = m_Identity->GetFullLen () + 256 + signingKeyLen + num*LEASE_SIZE + m_Identity->GetSignatureLen ();
m_BufferLen = m_Identity->GetFullLen () + 256 + signingKeyLen + 1 + num*LEASE_SIZE + m_Identity->GetSignatureLen ();
m_Buffer = new uint8_t[m_BufferLen];
auto offset = m_Identity->ToBuffer (m_Buffer, m_BufferLen);
memcpy (m_Buffer + offset, encryptionPublicKey, 256);

Loading…
Cancel
Save