Check entity parsing policy can't be changed mid-parse

This commit is contained in:
Rhodri James 2017-02-06 18:30:36 +00:00 committed by Sebastian Pipping
parent 7c27879ec9
commit bcee6525d1

View file

@ -1848,6 +1848,9 @@ START_TEST(test_user_parameters)
xml_failure(parser);
if (comment_count != 2)
fail("Comment handler not invoked enough times");
/* Ensure we can't change policy mid-parse */
if (XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_NEVER))
fail("Changed param entity parsing policy while parsing");
if (_XML_Parse_SINGLE_BYTES(parser, epilog, strlen(epilog),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);