From b4524892fbb79a03f9a000ee7407743b07343b33 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sun, 10 Dec 2017 15:36:15 +0000 Subject: rpc: guard against json parsing a non object --- src/rpc/message.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/rpc/message.cpp') diff --git a/src/rpc/message.cpp b/src/rpc/message.cpp index d6da124d1..98b40e667 100644 --- a/src/rpc/message.cpp +++ b/src/rpc/message.cpp @@ -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(); } -- cgit v1.2.3