From 3c3ef34505a5e907243e134ac9a90376b673a0c0 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 5 Aug 2016 22:24:04 +1200 Subject: [PATCH] Add missing assert --- src/crypto/equihash.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/crypto/equihash.cpp b/src/crypto/equihash.cpp index 3706b0c9e..2bd7b7ada 100644 --- a/src/crypto/equihash.cpp +++ b/src/crypto/equihash.cpp @@ -306,6 +306,7 @@ bool Equihash::BasicSolve(const eh_HashState& base_state, template bool IsProbablyDuplicate(std::shared_ptr indices, size_t lenIndices) { + assert(lenIndices <= MAX_INDICES); bool checked_index[MAX_INDICES] = {false}; bool count_checked = 0; for (int z = 0; z < lenIndices; z++) {