diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2018-01-23 16:37:54 +0100 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2018-01-23 16:37:54 +0100 |
commit | 707ad080e61014ab4a6d60dc12875e233c1f673c (patch) | |
tree | 5166b89b172aa491ee6f504ffd4e8edb869c3587 | |
parent | ab362ab0ad3af54406ae8237a525405c6e2a705b (diff) | |
download | libxml2-707ad080e61014ab4a6d60dc12875e233c1f673c.tar.gz |
Fix xmlParserEntityCheck
A previous commit removed the check for XML_ERR_ENTITY_LOOP which is
required to abort early in case of excessive entity recursion.
-rw-r--r-- | parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -149,7 +149,7 @@ xmlParserEntityCheck(xmlParserCtxtPtr ctxt, size_t size, rep = xmlStringDecodeEntities(ctxt, ent->content, XML_SUBSTITUTE_REF, 0, 0, 0); --ctxt->depth; - if (rep == NULL) { + if ((rep == NULL) || (ctxt->errNo == XML_ERR_ENTITY_LOOP)) { ent->content[0] = 0; } |