mirror of
https://github.com/monero-project/monero.git
synced 2025-06-07 17:12:43 -04:00
check accessing an element past the end of a container
This commit is contained in:
parent
2305bf260d
commit
b49ddc766d
8 changed files with 46 additions and 12 deletions
|
@ -259,7 +259,7 @@ namespace cryptonote
|
|||
ar.tag("rctsig_prunable");
|
||||
ar.begin_object();
|
||||
r = rct_signatures.p.serialize_rctsig_prunable(ar, rct_signatures.type, vin.size(), vout.size(),
|
||||
vin[0].type() == typeid(txin_to_key) ? boost::get<txin_to_key>(vin[0]).key_offsets.size() - 1 : 0);
|
||||
vin.size() > 0 && vin[0].type() == typeid(txin_to_key) ? boost::get<txin_to_key>(vin[0]).key_offsets.size() - 1 : 0);
|
||||
if (!r || !ar.stream().good()) return false;
|
||||
ar.end_object();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue