aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_utilities
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-02-02 16:10:34 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-02-02 16:11:15 +0000
commit24803ed91f7e062ea66663d06daae2d30132f2cd (patch)
tree650febcde4f4db9459c4f16bca51331c193123d0 /src/blockchain_utilities
parentperf_timer: rewrite to make it clear there is no division by zero (diff)
downloadmonero-24803ed91f7e062ea66663d06daae2d30132f2cd.tar.xz
blockchain_export: fix buffer overflow in exporter
Coverity 182550
Diffstat (limited to 'src/blockchain_utilities')
-rw-r--r--src/blockchain_utilities/blocksdat_file.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/blockchain_utilities/blocksdat_file.cpp b/src/blockchain_utilities/blocksdat_file.cpp
index 2bad86dfd..45ef33acb 100644
--- a/src/blockchain_utilities/blocksdat_file.cpp
+++ b/src/blockchain_utilities/blocksdat_file.cpp
@@ -106,7 +106,7 @@ void BlocksdatFile::write_block(const crypto::hash& block_hash)
{
crypto::hash hash;
crypto::cn_fast_hash(m_hashes.data(), HASH_OF_HASHES_STEP * sizeof(crypto::hash), hash);
- memmove(m_hashes.data(), m_hashes.data() + HASH_OF_HASHES_STEP * sizeof(crypto::hash), (m_hashes.size() - HASH_OF_HASHES_STEP) * sizeof(crypto::hash));
+ memmove(m_hashes.data(), m_hashes.data() + HASH_OF_HASHES_STEP, (m_hashes.size() - HASH_OF_HASHES_STEP) * sizeof(crypto::hash));
m_hashes.resize(m_hashes.size() - HASH_OF_HASHES_STEP);
const std::string data(hash.data, sizeof(hash));
*m_raw_data_file << data;