From 7f7d42f8904924240a671cae6250f20299a74d1d Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Mon, 7 Aug 2017 21:09:19 +0100 Subject: [PATCH] core: fix invalid memory access creating tx --- src/cryptonote_core/cryptonote_tx_utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cryptonote_core/cryptonote_tx_utils.cpp b/src/cryptonote_core/cryptonote_tx_utils.cpp index abb4b31e..30e1431b 100644 --- a/src/cryptonote_core/cryptonote_tx_utils.cpp +++ b/src/cryptonote_core/cryptonote_tx_utils.cpp @@ -265,7 +265,7 @@ namespace cryptonote // "Shuffle" outs std::vector shuffled_dsts(destinations); - std::random_shuffle(shuffled_dsts.begin(), shuffled_dsts.end(), [](int i) { return crypto::rand() % i; }); + std::random_shuffle(shuffled_dsts.begin(), shuffled_dsts.end(), [](unsigned int i) { return crypto::rand() % i; }); uint64_t summary_outs_money = 0; //fill outputs