mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +03:00
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.
This commit is contained in:
2
parser.c
2
parser.c
@@ -149,7 +149,7 @@ xmlParserEntityCheck(xmlParserCtxtPtr ctxt, size_t size,
|
|||||||
rep = xmlStringDecodeEntities(ctxt, ent->content,
|
rep = xmlStringDecodeEntities(ctxt, ent->content,
|
||||||
XML_SUBSTITUTE_REF, 0, 0, 0);
|
XML_SUBSTITUTE_REF, 0, 0, 0);
|
||||||
--ctxt->depth;
|
--ctxt->depth;
|
||||||
if (rep == NULL) {
|
if ((rep == NULL) || (ctxt->errNo == XML_ERR_ENTITY_LOOP)) {
|
||||||
ent->content[0] = 0;
|
ent->content[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user