ringct: add check for destinations/amount size being equal

This commit is contained in:
moneromooo-monero 2016-06-04 09:38:12 +01:00
parent e816a09292
commit 63856cad29
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3

View file

@ -470,6 +470,7 @@ namespace rct {
CHECK_AND_ASSERT_THROW_MES(mixin >= 0, "Mixin must be positive");
CHECK_AND_ASSERT_THROW_MES(amounts.size() > 0, "Amounts must not be empty");
CHECK_AND_ASSERT_THROW_MES(inSk.size() == inPk.size(), "Different number of public/private keys");
CHECK_AND_ASSERT_THROW_MES(amounts.size() == destinations.size(), "Different number of amounts/destinations");
rctSig rv;
rv.outPk.resize(destinations.size());