diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-10 15:36:15 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-18 15:15:32 +0000 |
commit | b4524892fbb79a03f9a000ee7407743b07343b33 (patch) | |
tree | 0e8754047c29c18daf4f1583fd326c1a655f5e4c | |
parent | easylogging++: avoid buffer underflow (diff) | |
download | monero-b4524892fbb79a03f9a000ee7407743b07343b33.tar.xz |
rpc: guard against json parsing a non object
Diffstat (limited to '')
-rw-r--r-- | src/rpc/message.cpp | 2 |
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(); } |