After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 736417 - xmllint: "parser error : '<' in entity 'name' is not allowed in attributes values" on repeated recursive entity expansion containing &lt;
xmllint: "parser error : '<' in entity 'name' is not allowed in attributes va...
Status: RESOLVED FIXED
Product: libxml2
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2014-09-10 13:56 UTC by Martin Walch
Modified: 2014-10-08 08:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Martin Walch 2014-09-10 13:56:04 UTC
This test case

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE testfile
[
  <!ENTITY test "&lt;">
]>
<root>
  <leaf0 attribute="&test;" />
  <leaf1 attribute="&test;" />
</root>


yields

8: parser error : '<' in entity 'test' is not allowed in attributes values
  <leaf1 attribute="&test;" />

There is no problem when removing leaf1. So the first occurrence of &test; is ok, but the second one fails. Maybe there is a problem caused by entity caching?
Comment 1 Daniel Veillard 2014-10-08 08:12:57 UTC
 Interesting bug :-) and due to a weird side effect and a failure
to properly parenthesize a boolean expression

now fixed:

thinkpad:~/XML -> xmllint attrib_ent.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE testfile [
<!ENTITY test "&lt;">
]>
<root>
  <leaf0 attribute="&test;"/>
  <leaf1 attribute="&test;"/>
</root>
thinkpad:~/XML -> 

  https://git.gnome.org/browse/libxml2/commit/?id=7cf57380b11d20b0bd4c86a493db7a0e1d0f0071

  thanks for the report, a good one ! :-)

Daniel