aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/lmdb/db_lmdb.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-09-19 14:11:24 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-09-19 14:11:24 +0100
commit9aeae7a2245dd2f6f26149c4276c8897eba3ddd3 (patch)
tree1e756ef8dc4651e523c893dce1cf66a9d20134c4 /src/blockchain_db/lmdb/db_lmdb.cpp
parentMerge pull request #2446 (diff)
downloadmonero-9aeae7a2245dd2f6f26149c4276c8897eba3ddd3.tar.xz
db_lmdb: fix use of uninitialized key in for_blocks_range
Diffstat (limited to 'src/blockchain_db/lmdb/db_lmdb.cpp')
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp
index b6978bdc4..c6e24ef98 100644
--- a/src/blockchain_db/lmdb/db_lmdb.cpp
+++ b/src/blockchain_db/lmdb/db_lmdb.cpp
@@ -2420,8 +2420,8 @@ bool BlockchainLMDB::for_blocks_range(const uint64_t& h1, const uint64_t& h2, st
MDB_cursor_op op;
if (h1)
{
- MDB_val_set(k, h1);
- op = MDB_SET;
+ k = MDB_val{sizeof(h1), (void*)&h1};
+ op = MDB_SET;
} else
{
op = MDB_FIRST;