mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-10-22 12:02:25 +00:00
fix termination block processing and size check
This commit is contained in:
1 parent
17c4038c60
commit
ea7cf1cf69
2 files changed
+15
-10
No files matched your search
+1
-1
@@ -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