aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwarptangent <warptangent@inbox.com>2015-01-28 09:46:04 -0800
committerwarptangent <warptangent@inbox.com>2015-02-01 19:28:58 -0800
commitd00ee784db647ecb1be454a3c5939fac619e7a54 (patch)
tree31d94af02ba9c09b7542f40e3c7544fe6f8ddee6
parentMerge remote-tracking branch 'origin/pr/24' into blockchain (diff)
downloadmonero-d00ee784db647ecb1be454a3c5939fac619e7a54.tar.xz
Update recently added log statement to fix possible null dereference
This would have been triggered if function was called without fourth parameter and ring signature check failed.
-rw-r--r--src/cryptonote_core/blockchain.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index c5771882d..8740efb9f 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -1866,7 +1866,11 @@ bool Blockchain::check_tx_inputs(const transaction& tx, uint64_t* pmax_used_bloc
// signature spending it.
if(!check_tx_input(in_to_key, tx_prefix_hash, tx.signatures[sig_index], pmax_used_block_height))
{
- LOG_PRINT_L0("Failed to check ring signature for tx " << get_transaction_hash(tx) << " vin key with k_image: " << in_to_key.k_image << " sig_index: " << sig_index << " *pmax_used_block_height: " << *pmax_used_block_height);
+ LOG_PRINT_L0("Failed to check ring signature for tx " << get_transaction_hash(tx) << " vin key with k_image: " << in_to_key.k_image << " sig_index: " << sig_index);
+ if (pmax_used_block_height) // a default value of NULL is used when called from Blockchain::handle_block_to_main_chain()
+ {
+ LOG_PRINT_L0(" *pmax_used_block_height: " << *pmax_used_block_height);
+ }
return false;
}