mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
cryptonote_basic: check output type before using it
Reported by QuarksLab.
This commit is contained in:
parent
61632dc166
commit
d1591853bf
1 changed files with 7 additions and 0 deletions
|
@ -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 a new issue