Merge pull request #2477

9aeae7a2 db_lmdb: fix use of uninitialized key in for_blocks_range (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2017-09-21 12:07:07 +02:00
commit bd85a47a29
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD

View File

@ -2420,8 +2420,8 @@ bool BlockchainLMDB::for_blocks_range(const uint64_t& h1, const uint64_t& h2, st
MDB_cursor_op op; MDB_cursor_op op;
if (h1) if (h1)
{ {
MDB_val_set(k, h1); k = MDB_val{sizeof(h1), (void*)&h1};
op = MDB_SET; op = MDB_SET;
} else } else
{ {
op = MDB_FIRST; op = MDB_FIRST;