From dc0b86ab4b3ee834d0327458c195fa191152bcf2 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Mon, 28 Jan 2019 22:17:43 +0000 Subject: block_queue: fix late sanity check off by one --- src/cryptonote_protocol/block_queue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cryptonote_protocol') diff --git a/src/cryptonote_protocol/block_queue.cpp b/src/cryptonote_protocol/block_queue.cpp index 672696944..716b0c8ba 100644 --- a/src/cryptonote_protocol/block_queue.cpp +++ b/src/cryptonote_protocol/block_queue.cpp @@ -240,7 +240,7 @@ std::pair block_queue::reserve_span(uint64_t first_block_hei MDEBUG("reserve_span: early out: first_block_height " << first_block_height << ", last_block_height " << last_block_height << ", max_blocks " << max_blocks); return std::make_pair(0, 0); } - if (block_hashes.size() >= last_block_height) + if (block_hashes.size() > last_block_height) { MDEBUG("reserve_span: more block hashes than fit within last_block_height: " << block_hashes.size() << " and " << last_block_height); return std::make_pair(0, 0); -- cgit v1.2.3