disallow oversized CBlockHeaderAndShortTxIDs
Otherwise we'd reply with a bogus BlockTransactionsRequest trying to
request indexes with overflowed deltas.
Github-Pull: #14685
Rebased-From: b08af10fb2
This commit is contained in:
parent
5331ad0506
commit
2f9fd29321
1 changed files with 3 additions and 0 deletions
|
@ -186,6 +186,9 @@ public:
|
||||||
|
|
||||||
READWRITE(prefilledtxn);
|
READWRITE(prefilledtxn);
|
||||||
|
|
||||||
|
if (BlockTxCount() > std::numeric_limits<uint16_t>::max())
|
||||||
|
throw std::ios_base::failure("indexes overflowed 16 bits");
|
||||||
|
|
||||||
if (ser_action.ForRead())
|
if (ser_action.ForRead())
|
||||||
FillShortTxIDSelector();
|
FillShortTxIDSelector();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue