mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-15 00:38:15 +00:00
Check entity parsing policy can't be changed mid-parse
This commit is contained in:
parent
7c27879ec9
commit
bcee6525d1
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue