mirror of
https://github.com/monero-project/monero.git
synced 2024-12-22 19:49:30 +00:00
rpc: guard against json parsing a non object
This commit is contained in:
parent
c2ed8618e4
commit
b4524892fb
1 changed files with 1 additions and 1 deletions
|
@ -111,7 +111,7 @@ FullMessage::FullMessage(Message* message)
|
|||
FullMessage::FullMessage(const std::string& json_string, bool request)
|
||||
{
|
||||
doc.Parse(json_string.c_str());
|
||||
if (doc.HasParseError())
|
||||
if (doc.HasParseError() || !doc.IsObject())
|
||||
{
|
||||
throw cryptonote::json::PARSE_FAIL();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue