summaryrefslogtreecommitdiff
path: root/result
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2023-01-17 13:50:51 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2023-01-17 13:59:24 +0100
commitd320a683d14669cd2426245767fd944e68564cda (patch)
tree1b7cb50c1a3ada5690a85f7deb834a595c847da5 /result
parent59b33661784359c6d3a8309ddbd2129fb2688548 (diff)
downloadlibxml2-d320a683d14669cd2426245767fd944e68564cda.tar.gz
parser: Fix entity check in attributes
Don't set the "checked" flag when checking entities in default attribute values. These entities could reference other entities which weren't defined yet, so the check isn't reliable. This fixes a short-lived regression which could lead to a call stack overflow later in xmlStringGetNodeList.
Diffstat (limited to 'result')
-rw-r--r--result/errors/rec_att_default.xml.ent6
-rw-r--r--result/errors/rec_att_default.xml.err6
-rw-r--r--result/errors/rec_att_default.xml.str7
3 files changed, 19 insertions, 0 deletions
diff --git a/result/errors/rec_att_default.xml.ent b/result/errors/rec_att_default.xml.ent
new file mode 100644
index 00000000..375a0d65
--- /dev/null
+++ b/result/errors/rec_att_default.xml.ent
@@ -0,0 +1,6 @@
+./test/errors/rec_att_default.xml:3: parser error : Entity 'b' not defined
+ <!ATTLIST x y CDATA "&a;">
+ ^
+./test/errors/rec_att_default.xml:6: parser error : Detected an entity reference loop
+<doc attr="&a;"/>
+ ^
diff --git a/result/errors/rec_att_default.xml.err b/result/errors/rec_att_default.xml.err
new file mode 100644
index 00000000..375a0d65
--- /dev/null
+++ b/result/errors/rec_att_default.xml.err
@@ -0,0 +1,6 @@
+./test/errors/rec_att_default.xml:3: parser error : Entity 'b' not defined
+ <!ATTLIST x y CDATA "&a;">
+ ^
+./test/errors/rec_att_default.xml:6: parser error : Detected an entity reference loop
+<doc attr="&a;"/>
+ ^
diff --git a/result/errors/rec_att_default.xml.str b/result/errors/rec_att_default.xml.str
new file mode 100644
index 00000000..11e6556b
--- /dev/null
+++ b/result/errors/rec_att_default.xml.str
@@ -0,0 +1,7 @@
+./test/errors/rec_att_default.xml:3: parser error : Entity 'b' not defined
+ <!ATTLIST x y CDATA "&a;">
+ ^
+./test/errors/rec_att_default.xml:6: parser error : Detected an entity reference loop
+<doc attr="&a;"/>
+ ^
+./test/errors/rec_att_default.xml : failed to parse