mirror of
https://github.com/monero-project/monero.git
synced 2025-12-31 15:06:11 -08:00
Merge pull request #6727
13eee1d6arpc: reject wrong sized txid (moneromooo-monero)92e6b7df2easylogging++: fix crash with reentrant logging (moneromooo-monero)6dd95d530epee: guard against exceptions in RPC handlers (moneromooo-monero)90016ad74blockchain: guard against exceptions in add_new_block/children (moneromooo-monero)
This commit is contained in:
@@ -2454,14 +2454,13 @@ namespace cryptonote
|
||||
{
|
||||
for (const auto &str: req.txids)
|
||||
{
|
||||
cryptonote::blobdata txid_data;
|
||||
if(!epee::string_tools::parse_hexstr_to_binbuff(str, txid_data))
|
||||
crypto::hash txid;
|
||||
if(!epee::string_tools::hex_to_pod(str, txid))
|
||||
{
|
||||
failed = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
crypto::hash txid = *reinterpret_cast<const crypto::hash*>(txid_data.data());
|
||||
txids.push_back(txid);
|
||||
}
|
||||
}
|
||||
@@ -2806,15 +2805,14 @@ namespace cryptonote
|
||||
res.status = "";
|
||||
for (const auto &str: req.txids)
|
||||
{
|
||||
cryptonote::blobdata txid_data;
|
||||
if(!epee::string_tools::parse_hexstr_to_binbuff(str, txid_data))
|
||||
crypto::hash txid;
|
||||
if(!epee::string_tools::hex_to_pod(str, txid))
|
||||
{
|
||||
if (!res.status.empty()) res.status += ", ";
|
||||
res.status += std::string("invalid transaction id: ") + str;
|
||||
failed = true;
|
||||
continue;
|
||||
}
|
||||
crypto::hash txid = *reinterpret_cast<const crypto::hash*>(txid_data.data());
|
||||
|
||||
cryptonote::blobdata txblob;
|
||||
if (m_core.get_pool_transaction(txid, txblob, relay_category::legacy))
|
||||
|
||||
Reference in New Issue
Block a user