[libxml2] Fix xmlParserEntityCheck
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix xmlParserEntityCheck
- Date: Tue, 23 Jan 2018 15:40:14 +0000 (UTC)
commit 707ad080e61014ab4a6d60dc12875e233c1f673c
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Tue Jan 23 16:37:54 2018 +0100
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.
parser.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/parser.c b/parser.c
index 5e800e1..ca9fde2 100644
--- a/parser.c
+++ b/parser.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]