mirror of
https://github.com/monero-project/monero.git
synced 2025-08-01 14:16:10 -04:00
add empty container sanity checks when using front() and back()
This commit is contained in:
parent
56fa6ce15f
commit
45a1c4c088
9 changed files with 32 additions and 6 deletions
|
@ -205,6 +205,8 @@ namespace
|
|||
*/
|
||||
bool checksum_test(std::vector<std::string> seed, uint32_t unique_prefix_length)
|
||||
{
|
||||
if (seed.empty())
|
||||
return false;
|
||||
// The last word is the checksum.
|
||||
std::string last_word = seed.back();
|
||||
seed.pop_back();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue