aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-09-10 11:48:20 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-09-25 15:48:24 +0100
commit92f2f687b981215109b15403d0d15512da5a367e (patch)
tree532027254c7809a8062a1444250d9b14a90cddd6 /src
parentwallet2_api: remove an unused, uninitialized, field (diff)
downloadmonero-92f2f687b981215109b15403d0d15512da5a367e.tar.xz
core: check return value from parse_hexstr_to_binbuff
Diffstat (limited to 'src')
-rw-r--r--src/cryptonote_core/cryptonote_tx_utils.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cryptonote_core/cryptonote_tx_utils.cpp b/src/cryptonote_core/cryptonote_tx_utils.cpp
index 94f069827..258119566 100644
--- a/src/cryptonote_core/cryptonote_tx_utils.cpp
+++ b/src/cryptonote_core/cryptonote_tx_utils.cpp
@@ -484,8 +484,9 @@ namespace cryptonote
std::string genesis_coinbase_tx_hex = config::GENESIS_TX;
blobdata tx_bl;
- string_tools::parse_hexstr_to_binbuff(genesis_coinbase_tx_hex, tx_bl);
- bool r = parse_and_validate_tx_from_blob(tx_bl, bl.miner_tx);
+ bool r = string_tools::parse_hexstr_to_binbuff(genesis_coinbase_tx_hex, tx_bl);
+ CHECK_AND_ASSERT_MES(r, false, "failed to parse coinbase tx from hard coded blob");
+ r = parse_and_validate_tx_from_blob(tx_bl, bl.miner_tx);
CHECK_AND_ASSERT_MES(r, false, "failed to parse coinbase tx from hard coded blob");
bl.major_version = CURRENT_BLOCK_MAJOR_VERSION;
bl.minor_version = CURRENT_BLOCK_MINOR_VERSION;