mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-27 05:13:25 +01:00
cryptonote_basic: check output type before using it
Reported by QuarksLab.
This commit is contained in:
parent
61632dc166
commit
d1591853bf
@ -135,7 +135,14 @@ namespace cryptonote
|
||||
return false;
|
||||
}
|
||||
for (size_t n = 0; n < tx.rct_signatures.outPk.size(); ++n)
|
||||
{
|
||||
if (tx.vout[n].target.type() != typeid(txout_to_key))
|
||||
{
|
||||
LOG_PRINT_L1("Unsupported output type in tx " << get_transaction_hash(tx));
|
||||
return false;
|
||||
}
|
||||
rv.outPk[n].dest = rct::pk2rct(boost::get<txout_to_key>(tx.vout[n].target).key);
|
||||
}
|
||||
|
||||
if (!base_only)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user