disallow oversized CBlockHeaderAndShortTxIDs

Otherwise we'd reply with a bogus BlockTransactionsRequest trying to
request indexes with overflowed deltas.
This commit is contained in:
Kaz Wesley 2018-11-13 12:40:22 -08:00
parent 6bed4b374d
commit b08af10fb2

View file

@ -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();
} }