diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2023-01-17 13:50:51 +0100 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2023-01-17 13:59:24 +0100 |
commit | d320a683d14669cd2426245767fd944e68564cda (patch) | |
tree | 1b7cb50c1a3ada5690a85f7deb834a595c847da5 /result | |
parent | 59b33661784359c6d3a8309ddbd2129fb2688548 (diff) | |
download | libxml2-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.ent | 6 | ||||
-rw-r--r-- | result/errors/rec_att_default.xml.err | 6 | ||||
-rw-r--r-- | result/errors/rec_att_default.xml.str | 7 |
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 |