mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-10 13:13:27 +01:00
rpc: guard against json parsing a non object
This commit is contained in:
parent
c2ed8618e4
commit
b4524892fb
@ -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 New Issue
Block a user