]> granicus.if.org Git - libexpat/commitdiff
Make test_alloc_realloc_long_attribute_value() robust vs allocations
authorRhodri James <rhodri@kynesim.co.uk>
Thu, 27 Jul 2017 13:09:07 +0000 (14:09 +0100)
committerRhodri James <rhodri@kynesim.co.uk>
Thu, 27 Jul 2017 13:09:07 +0000 (14:09 +0100)
expat/tests/runtests.c

index 34eb9c48264b739a5b056251c6d9bebfe2c26825..1d6eacb60e78a399d77eb452fbfe94afaf71c3a3 100644 (file)
@@ -9591,7 +9591,9 @@ START_TEST(test_alloc_realloc_long_attribute_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("Parse succeeded despite failing reallocator");