cryptonote_basic: check output type before using it

Reported by QuarksLab.
release-v0.5.1
moneromooo-monero 6 years ago
parent 61632dc166
commit d1591853bf
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

@ -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…
Cancel
Save