mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
fix termination block processing and size check
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user