mirror of
https://github.com/monero-project/monero.git
synced 2025-08-19 15:37:59 -04:00
Merge pull request #9981
6131dde
rpc: return error correctly on bad key image string (jeffro256)
This commit is contained in:
commit
40cd9ba0c4
1 changed files with 3 additions and 1 deletions
|
@ -1287,8 +1287,10 @@ namespace cryptonote
|
||||||
if(b.size() != sizeof(crypto::key_image))
|
if(b.size() != sizeof(crypto::key_image))
|
||||||
{
|
{
|
||||||
res.status = "Failed, size of data mismatch";
|
res.status = "Failed, size of data mismatch";
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
key_images.push_back(*reinterpret_cast<const crypto::key_image*>(b.data()));
|
crypto::key_image &ki = key_images.emplace_back();
|
||||||
|
memcpy(&ki, b.data(), sizeof(crypto::key_image));
|
||||||
}
|
}
|
||||||
std::vector<bool> spent_status;
|
std::vector<bool> spent_status;
|
||||||
bool r = m_core.are_key_images_spent(key_images, spent_status);
|
bool r = m_core.are_key_images_spent(key_images, spent_status);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue