]> granicus.if.org Git - libexpat/commitdiff
Make test_alloc_realloc_subst_public_entity_value() robust vs allocation
authorRhodri James <rhodri@kynesim.co.uk>
Thu, 27 Jul 2017 12:30:42 +0000 (13:30 +0100)
committerRhodri James <rhodri@kynesim.co.uk>
Thu, 27 Jul 2017 12:30:42 +0000 (13:30 +0100)
expat/tests/runtests.c

index 980d5717463975b9610c1f2646a0329ac4abf322..64da4c9c7cd5aee3ef0fed6b19513a356824dde8 100644 (file)
@@ -8805,7 +8805,9 @@ START_TEST(test_alloc_realloc_subst_public_entity_value)
         if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
                                     XML_TRUE) != XML_STATUS_ERROR)
             break;
-        XML_ParserReset(parser, NULL);
+        /* See comment in test_alloc_parse_xdecl() */
+        alloc_teardown();
+        alloc_setup();
     }
     if (i == 0)
         fail("Parsing worked despite failing reallocation");