Browse Source

fixed buffer overflow

pull/97/head
orignal 10 years ago
parent
commit
42dd8dd72e
  1. 1
      SSUData.cpp
  2. 2
      SSUData.h

1
SSUData.cpp

@ -253,6 +253,7 @@ namespace ssu @@ -253,6 +253,7 @@ namespace ssu
while (len > 0)
{
Fragment * fragment = new Fragment;
fragment->fragmentNum = fragmentNum;
uint8_t * buf = fragment->buf;
fragments.push_back (fragment);
uint8_t * payload = buf + sizeof (SSUHeader);

2
SSUData.h

@ -14,7 +14,7 @@ namespace i2p @@ -14,7 +14,7 @@ namespace i2p
namespace ssu
{
const size_t SSU_MTU = 1484;
const size_t SSU_MTU = 1472; // 1484;
const int RESEND_INTERVAL = 3; // in seconds
const int MAX_NUM_RESENDS = 5;
// data flags

Loading…
Cancel
Save