Skip to content

Commit

Permalink
fix improper size calc
Browse files Browse the repository at this point in the history
  • Loading branch information
U65535F committed Jan 31, 2025
1 parent 20e6095 commit 546fb29
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/wallet/wallet2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6236,6 +6236,9 @@ std::string wallet2::make_background_keys_file_name(const std::string &wallet_fi
//----------------------------------------------------------------------------------------------------
bool wallet2::parse_long_payment_id(const std::string& payment_id_str, crypto::hash& payment_id)
{
if (payment_id_str.size() != 64)
return false;

cryptonote::blobdata payment_id_data;
if(!epee::string_tools::parse_hexstr_to_binbuff(payment_id_str, payment_id_data))
return false;
Expand Down Expand Up @@ -15113,6 +15116,7 @@ bool wallet2::parse_uri(const std::string &uri, std::vector<uri_data> &data, std
}
else if (kv[0] == "tx_payment_id")
{
// standalone payment ids are deprecated. use integrated address
crypto::hash hash;
if (!wallet2::parse_long_payment_id(kv[1], hash))
{
Expand Down

0 comments on commit 546fb29

Please sign in to comment.