aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cryptonote_core/cryptonote_basic_impl.cpp24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/cryptonote_core/cryptonote_basic_impl.cpp b/src/cryptonote_core/cryptonote_basic_impl.cpp
index 839c6ad1e..abdef64f9 100644
--- a/src/cryptonote_core/cryptonote_basic_impl.cpp
+++ b/src/cryptonote_core/cryptonote_basic_impl.cpp
@@ -205,15 +205,25 @@ namespace cryptonote {
return false;
}
- integrated_address iadr;
- if (!::serialization::parse_binary(data, iadr))
+ if (has_payment_id)
{
- LOG_PRINT_L1("Account public address keys can't be parsed");
- return false;
+ integrated_address iadr;
+ if (!::serialization::parse_binary(data, iadr))
+ {
+ LOG_PRINT_L1("Account public address keys can't be parsed");
+ return false;
+ }
+ adr = iadr.adr;
+ payment_id = iadr.payment_id;
+ }
+ else
+ {
+ if (!::serialization::parse_binary(data, adr))
+ {
+ LOG_PRINT_L1("Account public address keys can't be parsed");
+ return false;
+ }
}
-
- adr = iadr.adr;
- payment_id = iadr.payment_id;
if (!crypto::check_key(adr.m_spend_public_key) || !crypto::check_key(adr.m_view_public_key))
{