diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-09-10 12:26:24 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-09-25 15:48:42 +0100 |
commit | 50e096987baa4ac74b51bbac987d329d4eac3f64 (patch) | |
tree | a1bd372c18e9b19872e5d8679da6c9df9fdab89d /src/cryptonote_core | |
parent | wallet_rpc_server: catch failure to create directory (diff) | |
download | monero-50e096987baa4ac74b51bbac987d329d4eac3f64.tar.xz |
tx_pool: guard against failure getting tx hash
Should be impossible in practice, but easy change
CID 175282
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r-- | src/cryptonote_core/tx_pool.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp index c31441a99..942dcedd3 100644 --- a/src/cryptonote_core/tx_pool.cpp +++ b/src/cryptonote_core/tx_pool.cpp @@ -298,7 +298,8 @@ namespace cryptonote { crypto::hash h = null_hash; size_t blob_size = 0; - get_transaction_hash(tx, h, blob_size); + if (!get_transaction_hash(tx, h, blob_size) || blob_size == 0) + return false; return add_tx(tx, h, blob_size, tvc, keeped_by_block, relayed, do_not_relay, version); } //--------------------------------------------------------------------------------- |