mirror of
https://github.com/wownero/wownero.git
synced 2026-12-02 22:23:53 +01:00
serialization: validate RingCT prunable JSON type
This commit is contained in:
@@ -1173,6 +1173,11 @@ void fromJsonValue(const rapidjson::Value& val, rct::rctSig& sig)
|
|||||||
const auto prunable = val.FindMember("prunable");
|
const auto prunable = val.FindMember("prunable");
|
||||||
if (prunable != val.MemberEnd())
|
if (prunable != val.MemberEnd())
|
||||||
{
|
{
|
||||||
|
if (!prunable->value.IsObject())
|
||||||
|
{
|
||||||
|
throw WRONG_TYPE("json object");
|
||||||
|
}
|
||||||
|
|
||||||
rct::keyV pseudo_outs = std::move(sig.get_pseudo_outs());
|
rct::keyV pseudo_outs = std::move(sig.get_pseudo_outs());
|
||||||
|
|
||||||
GET_FROM_JSON_OBJECT(prunable->value, sig.p.rangeSigs, range_proofs);
|
GET_FROM_JSON_OBJECT(prunable->value, sig.p.rangeSigs, range_proofs);
|
||||||
|
|||||||
Reference in New Issue
Block a user