diff options
author | Riccardo Spagni <ric@spagni.net> | 2015-06-16 21:48:14 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2015-06-16 21:48:20 +0200 |
commit | f43f0660aaca833afbb0940e10215a462b3379b2 (patch) | |
tree | 26cf95cbffe98a31aea70435f97cf25191b09785 | |
parent | Merge pull request #321 (diff) | |
parent | Fix standard address deserialization (diff) | |
download | monero-f43f0660aaca833afbb0940e10215a462b3379b2.tar.xz |
Merge pull request #322
f6da25a Fix standard address deserialization (moneromooo-monero)
-rw-r--r-- | src/cryptonote_core/cryptonote_basic_impl.cpp | 24 |
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)) { |