mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-11 21:22:47 +01:00
disallow oversized CBlockHeaderAndShortTxIDs
Otherwise we'd reply with a bogus BlockTransactionsRequest trying to request indexes with overflowed deltas.
This commit is contained in:
@@ -186,6 +186,9 @@ public:
|
||||
|
||||
READWRITE(prefilledtxn);
|
||||
|
||||
if (BlockTxCount() > std::numeric_limits<uint16_t>::max())
|
||||
throw std::ios_base::failure("indexes overflowed 16 bits");
|
||||
|
||||
if (ser_action.ForRead())
|
||||
FillShortTxIDSelector();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user