mirror of
https://github.com/monero-project/monero.git
synced 2024-12-13 20:06:32 +02: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;
|
return false;
|
||||||
}
|
}
|
||||||
for (size_t n = 0; n < tx.rct_signatures.outPk.size(); ++n)
|
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);
|
rv.outPk[n].dest = rct::pk2rct(boost::get<txout_to_key>(tx.vout[n].target).key);
|
||||||
|
}
|
||||||
|
|
||||||
if (!base_only)
|
if (!base_only)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user