fix huge number of declaration security issue

This commit is contained in:
Lee Thomason
2018-07-28 14:56:20 -07:00
parent c483646db0
commit db13a82e62
3 changed files with 32 additions and 9 deletions

View File

@@ -2050,6 +2050,18 @@ int main( int argc, const char ** argv )
XMLTest("Stack overflow prevented.", XML_ELEMENT_DEPTH_EXCEEDED, doc.ErrorID());
}
}
{
const char* TESTS[] = {
"./resources/xmltest-5662204197076992.xml", // Security-level performance issue.
0
};
for (int i = 0; TESTS[i]; ++i) {
XMLDocument doc;
doc.LoadFile(TESTS[i]);
// Need only not crash / lock up.
XMLTest("Fuzz attack prevented.", true, true);
}
}
{
// Crashing reported via email.
const char* xml =