diff --git a/parser.c b/parser.c index 781aa0c5..1e23d26a 100644 --- a/parser.c +++ b/parser.c @@ -8327,6 +8327,7 @@ xmlParseStringPEReference(xmlParserCtxtPtr ctxt, const xmlChar **str) { entity = ctxt->sax->getParameterEntity(ctxt->userData, name); if (ctxt->instate == XML_PARSER_EOF) { xmlFree(name); + *str = ptr; return(NULL); } if (entity == NULL) {