Fix memory corruption issue in schema parser.

This commit is contained in:
Tristan Penman 2014-04-17 23:06:48 +00:00
parent 11af5466f0
commit f604f11ada

View File

@ -88,8 +88,10 @@ public:
}
if ((itr = object.find("allOf")) != object.end()) {
const AdapterType &childNode = resolveReference<AdapterType>(deref, schema, itr->second);
schema.addConstraint(makeAllOfConstraint(childNode, deref));
const AdapterType originalChildNode = itr->second;
const AdapterType &actualChildNode = resolveReference<AdapterType>(deref, schema,
originalChildNode);
schema.addConstraint(makeAllOfConstraint(actualChildNode, deref));
}
if ((itr = object.find("anyOf")) != object.end()) {