Open toktarev opened 3 years ago
The following code causes segfault:
TEST(SchemaValidator, Object_PatternProperties) { Document sd; sd.Parse( R"( { "type": "object", "additionalProperties": false, "properties": { "ActiveInterface": { "type": "string", "default": "eth0" }, "Interfaces": { "type": "object", "additionalProperties": false, "patternProperties": { "^.*$": { "type": "object", "additionalProperties": false, "properties": { "Ip": { "type": "string" }, "Netmask": { "type": "string" }, "Gateway": { "type": "string" }, "Dhcp": { "type": "boolean", "default": true } } } } }, "DNS1": { "type": "string" }, "DNS2": { "type": "string" }, "NAT": { "enum": [ "no", "router", "stun" ], "default": "no" }, "Address": { "type": "string" }, "Port": { "type": "integer", "default": 3478 } } } )"); SchemaDocument s(sd); std::string str = R"({ "ActiveInterface": "", "Address": "192.168.0.1", "DNS1": "", "DNS2": "", "Interfaces": { "eth3": { "Dhcp": "true", "Gateway": "10.0.2.2", "Ip": "10.0.2.15", "Netmask": "255.255.255.0", "autoneg": "-", "duplex": "-", "fullSpeeds": "", "halfSpeeds": "", "speed": "-" }, "eth4": { "Dhcp": "true", "Gateway": "", "Ip": "192.168.1.4", "Netmask": "255.255.255.0", "autoneg": "-", "duplex": "-", "fullSpeeds": "", "halfSpeeds": "", "speed": "-" } }, "NAT": "no", "Port": "3478" })"; VALIDATE(s, str, true); }
Version: 1.1.0
I cannot reproduce this in the lastest master on MacOS and Windows.
Yes, I mentioned about version: Version: 1.1.0.
I don't see other latest releases
The following code causes segfault: