]> Git Repo - VerusCoin.git/commitdiff
Add missing assert
authorJack Grigg <[email protected]>
Fri, 5 Aug 2016 10:24:04 +0000 (22:24 +1200)
committerJack Grigg <[email protected]>
Fri, 5 Aug 2016 10:24:04 +0000 (22:24 +1200)
src/crypto/equihash.cpp

index 3706b0c9e37cfd7a694ce951e23caa12a084dc2a..2bd7b7ada58f52ffa4cf2012c33cdd11ee6fa1c0 100644 (file)
@@ -306,6 +306,7 @@ bool Equihash<N,K>::BasicSolve(const eh_HashState& base_state,
 template<size_t MAX_INDICES>
 bool IsProbablyDuplicate(std::shared_ptr<eh_trunc> 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++) {
This page took 0.0287 seconds and 4 git commands to generate.