correct incorrect block size for padding block

This commit is contained in:
orignal
2026-08-31 16:12:40 -04:00
parent 184dfb1df9
commit b46554de65
+8 -2
View File
@@ -1283,8 +1283,14 @@ namespace transport
LogPrint (eLogDebug, "NTCP2: Block type ", (int)blk, " of size ", size);
if (offset + size > len)
{
LogPrint (eLogError, "NTCP2: Unexpected block length ", size);
break;
if (blk == eNTCP2BlkPadding)
// padding is always last block and we set size up to end of frame
size = len - offset;
else
{
LogPrint (eLogError, "NTCP2: Unexpected block length ", size, " of type ", (int)blk);
break;
}
}
switch (blk)
{