diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-11-24 12:57:45 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-11-24 12:57:45 +0200 |
commit | 694efaaf284041ffd97286fb3f745e139db35f3c (patch) | |
tree | 20a18aeade70924b9e00f54a342316fd76c0afaf | |
parent | Merge pull request #1361 (diff) | |
parent | tests: fix uninitialized data valgrind reports in levin tests (diff) | |
download | monero-694efaaf284041ffd97286fb3f745e139db35f3c.tar.xz |
Merge pull request #1362
ab7b56e tests: fix uninitialized data valgrind reports in levin tests (moneromooo-monero)
73e8a76 tests: fix uninitialized data valgrind reports in serialization tests (moneromooo-monero)
-rw-r--r-- | tests/unit_tests/epee_levin_protocol_handler_async.cpp | 1 | ||||
-rw-r--r-- | tests/unit_tests/serialization.cpp | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/tests/unit_tests/epee_levin_protocol_handler_async.cpp b/tests/unit_tests/epee_levin_protocol_handler_async.cpp index ca110eb59..2dd3ffe29 100644 --- a/tests/unit_tests/epee_levin_protocol_handler_async.cpp +++ b/tests/unit_tests/epee_levin_protocol_handler_async.cpp @@ -242,6 +242,7 @@ namespace m_req_head.m_cb = m_in_data.size(); m_req_head.m_have_to_return_data = true; m_req_head.m_command = expected_command; + m_req_head.m_return_code = LEVIN_OK; m_req_head.m_flags = LEVIN_PACKET_REQUEST; m_req_head.m_protocol_version = LEVIN_PROTOCOL_VER_1; diff --git a/tests/unit_tests/serialization.cpp b/tests/unit_tests/serialization.cpp index dc7f7cb06..b592f456b 100644 --- a/tests/unit_tests/serialization.cpp +++ b/tests/unit_tests/serialization.cpp @@ -395,7 +395,10 @@ TEST(Serialization, serializes_transacion_signatures_correctly) // Not enough signature vectors for all inputs txin_to_key txin_to_key1; - txin_to_key1.key_offsets.resize(2); + txin_to_key1.amount = 1; + memset(&txin_to_key1.k_image, 0x42, sizeof(crypto::key_image)); + txin_to_key1.key_offsets.push_back(12); + txin_to_key1.key_offsets.push_back(3453); tx.vin.clear(); tx.vin.push_back(txin_to_key1); tx.vin.push_back(txin_to_key1); |