From 718d51a66b0d69f3b8c5ff63d044c36dd5314232 Mon Sep 17 00:00:00 2001 From: Rhodri James Date: Thu, 31 Aug 2017 13:11:26 +0100 Subject: [PATCH] Fix for #137: check parse status before epilogue processing. This is just a sticking plaster; the parse status handling is currently being reconsidered for more general refactoring. --- expat/lib/xmlparse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index 1af1e8db..c50baa66 100644 --- a/expat/lib/xmlparse.c +++ b/expat/lib/xmlparse.c @@ -2959,8 +2959,10 @@ doContent(XML_Parser parser, poolClear(&tempPool); freeBindings(parser, bindings); } - if (tagLevel == 0) + if ((tagLevel == 0) && + !((ps_parsing == XML_FINISHED) || (ps_parsing == XML_SUSPENDED))) { return epilogProcessor(parser, next, end, nextPtr); + } break; case XML_TOK_END_TAG: if (tagLevel == startTagLevel) -- 2.40.0