Merge pull request #322

f6da25a Fix standard address deserialization (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2015-06-16 21:48:14 +02:00
commit f43f0660aa
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD

View file

@ -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))
{