mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
fix termination block processing and size check
This commit is contained in:
parent
17c4038c60
commit
ea7cf1cf69
2 changed files with 15 additions and 10 deletions
|
@ -884,7 +884,7 @@ namespace transport
|
|||
auto size = bufbe16toh (frame + offset);
|
||||
offset += 2;
|
||||
LogPrint (eLogDebug, "NTCP2: Block type ", (int)blk, " of size ", size);
|
||||
if (size > len)
|
||||
if (offset + size > len)
|
||||
{
|
||||
LogPrint (eLogError, "NTCP2: Unexpected block length ", size);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue