diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index 0a870376..38441248 100644 --- a/expat/lib/xmlparse.c +++ b/expat/lib/xmlparse.c @@ -5826,7 +5826,7 @@ processInternalEntity(XML_Parser parser, ENTITY *entity, XML_Bool betweenDecl) { if (textEnd != next && parser->m_parsingStatus.parsing == XML_SUSPENDED) { entity->processed = (int)(next - textStart); parser->m_processor = internalEntityProcessor; - } else { + } else if (parser->m_openInternalEntities->entity == entity) { #if XML_GE == 1 entityTrackingOnClose(parser, entity, __LINE__); #endif /* XML_GE == 1 */