aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/message.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-10 15:36:15 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-18 15:15:32 +0000
commitb4524892fbb79a03f9a000ee7407743b07343b33 (patch)
tree0e8754047c29c18daf4f1583fd326c1a655f5e4c /src/rpc/message.cpp
parenteasylogging++: avoid buffer underflow (diff)
downloadmonero-b4524892fbb79a03f9a000ee7407743b07343b33.tar.xz
rpc: guard against json parsing a non object
Diffstat (limited to '')
-rw-r--r--src/rpc/message.cpp2
1 files changed, 1 insertions, 1 deletions
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();
}