1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 20:25:14 +03:00
libxml2/result/valid
Nick Wellnhofer 01411e7c5e Check for invalid redeclarations of predefined entities
Implement section "4.6 Predefined Entities" of the XML 1.0 spec and
check whether redeclarations of predefined entities match the original
definitions.

Note that some test cases declared

    <!ENTITY lt "<">

But the XML spec clearly states that this is illegal:

> If the entities lt or amp are declared, they MUST be declared as
> internal entities whose replacement text is a character reference to
> the respective character (less-than sign or ampersand) being escaped;
> the double escaping is REQUIRED for these entities so that references
> to them produce a well-formed result.

Also fixes #217 but the connection is only tangential. The integer
overflow discovered by fuzzing was more related to the fact that various
parts of the parser disagreed on whether to prefer predefined entities
over their redeclarations. The whole situation is a mess and even
depends on legacy parser options. But now that redeclarations are
validated, it shouldn't make a difference.

As noted in the added comment, this is also one of the cases where
overly defensive checks can hide interesting logic bugs from fuzzers.
2021-02-08 21:51:26 +01:00
..
127772.xml swapped the attribute defaulting and attribute checking parts of parsing a 2003-11-25 07:21:18 +00:00
127772.xml.err swapped the attribute defaulting and attribute checking parts of parsing a 2003-11-25 07:21:18 +00:00
127772.xml.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
694228.xml Added a regression tests from bug 694228 data 2013-03-27 13:37:14 +08:00
694228.xml.err Added a regression tests from bug 694228 data 2013-03-27 13:37:14 +08:00
694228.xml.err.rdr Added a regression tests from bug 694228 data 2013-03-27 13:37:14 +08:00
737840.xml Fix the spurious ID already defined error 2015-09-10 19:46:46 +08:00
737840.xml.err Fix the spurious ID already defined error 2015-09-10 19:46:46 +08:00
737840.xml.err.rdr Fix the spurious ID already defined error 2015-09-10 19:46:46 +08:00
766956.xml Fix handling of parameter-entity references 2017-06-05 18:38:33 +02:00
766956.xml.err Get rid of "blanks wrapper" for parameter entities 2017-06-20 13:19:47 +02:00
766956.xml.err.rdr Get rid of "blanks wrapper" for parameter entities 2017-06-20 13:19:47 +02:00
781333.xml Fix buffer size checks in xmlSnprintfElementContent 2017-06-05 19:38:19 +02:00
781333.xml.err Fix buffer size checks in xmlSnprintfElementContent 2017-06-05 19:38:19 +02:00
781333.xml.err.rdr Fix buffer size checks in xmlSnprintfElementContent 2017-06-05 19:38:19 +02:00
cond_sect1.xml Make xmlParseConditionalSections non-recursive 2019-09-30 15:47:30 +02:00
cond_sect1.xml.err Make xmlParseConditionalSections non-recursive 2019-09-30 15:47:30 +02:00
cond_sect1.xml.err.rdr Make xmlParseConditionalSections non-recursive 2019-09-30 15:47:30 +02:00
cond_sect2.xml Make xmlParseConditionalSections non-recursive 2019-09-30 15:47:30 +02:00
cond_sect2.xml.err Make xmlParseConditionalSections non-recursive 2019-09-30 15:47:30 +02:00
cond_sect2.xml.err.rdr Make xmlParseConditionalSections non-recursive 2019-09-30 15:47:30 +02:00
dia.xml fixed bug #92518 validation error were not covering namespace 2002-09-26 16:10:21 +00:00
dia.xml.err Revamped HTML parsing, lots of bug fixes for HTML stuff, 1999-10-14 09:10:25 +00:00
dia.xml.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
id1.xml fixing bug #108976 get the ID/REFs to reference the ID in the document 2003-03-23 12:02:56 +00:00
id1.xml.err fixing bug #108976 get the ID/REFs to reference the ID in the document 2003-03-23 12:02:56 +00:00
id1.xml.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
id2.xml fixing bug #108976 get the ID/REFs to reference the ID in the document 2003-03-23 12:02:56 +00:00
id2.xml.err fixing bug #108976 get the ID/REFs to reference the ID in the document 2003-03-23 12:02:56 +00:00
id2.xml.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
id3.xml fixing bug #108976 get the ID/REFs to reference the ID in the document 2003-03-23 12:02:56 +00:00
id3.xml.err fixing bug #108976 get the ID/REFs to reference the ID in the document 2003-03-23 12:02:56 +00:00
id3.xml.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
index.xml fixed #127877, never output &quot; in element content this changes the 2003-11-25 18:29:55 +00:00
index.xml.err fixed an erroneous validation bug when PE refs occurs in external parsed 2001-10-23 13:10:19 +00:00
index.xml.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
mixed_ns.xml fixed bug #118712 about mixed content, and namespaced element names. added 2003-08-03 22:58:54 +00:00
mixed_ns.xml.err fixed bug #118712 about mixed content, and namespaced element names. added 2003-08-03 22:58:54 +00:00
mixed_ns.xml.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
notes.xml 446613 small validation bug mixed content with NS 2009-08-21 18:22:58 +02:00
notes.xml.err 446613 small validation bug mixed content with NS 2009-08-21 18:22:58 +02:00
notes.xml.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
ns2.xml fixing namespace DTD validations the output of defaulted namespaces is 2003-09-18 22:03:46 +00:00
ns2.xml.err applied the patch provided by Brent Hendricks fixing #105992 and 2003-04-22 08:37:26 +00:00
ns2.xml.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
ns.xml fixing namespace DTD validations the output of defaulted namespaces is 2003-09-18 22:03:46 +00:00
ns.xml.err applied the patch provided by Brent Hendricks fixing #105992 and 2003-04-22 08:37:26 +00:00
ns.xml.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
objednavka.xml fixed bug #170489 reported by Jirka Kosek added the test to the regression 2005-08-23 18:14:12 +00:00
objednavka.xml.err fixed bug #170489 reported by Jirka Kosek added the test to the regression 2005-08-23 18:14:12 +00:00
objednavka.xml.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
REC-xml-19980210.xml Check for invalid redeclarations of predefined entities 2021-02-08 21:51:26 +01:00
REC-xml-19980210.xml.err Revamped HTML parsing, lots of bug fixes for HTML stuff, 1999-10-14 09:10:25 +00:00
REC-xml-19980210.xml.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
rss.xml fixed an erroneous validation bug when PE refs occurs in external parsed 2001-10-23 13:10:19 +00:00
rss.xml.err cleaning up XPath error reporting that time. applied the two patches for 2003-10-07 21:25:12 +00:00
rss.xml.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
t4.dtd applied a couple of patches from Peter Jacobi to start to get rid of 2002-06-11 10:08:16 +00:00
t4.dtd.err changed 'make tests' to use a concise output, scrolling to see where thing 2003-10-02 22:28:19 +00:00
t4.dtd.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
t4.xml applied a couple of patches from Peter Jacobi to start to get rid of 2002-06-11 10:08:16 +00:00
t4.xml.err applied a couple of patches from Peter Jacobi to start to get rid of 2002-06-11 10:08:16 +00:00
t4.xml.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
t4a.dtd applied a couple of patches from Peter Jacobi to start to get rid of 2002-06-11 10:08:16 +00:00
t4a.dtd.err changed 'make tests' to use a concise output, scrolling to see where thing 2003-10-02 22:28:19 +00:00
t4a.dtd.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
t4a.xml applied a couple of patches from Peter Jacobi to start to get rid of 2002-06-11 10:08:16 +00:00
t4a.xml.err applied a couple of patches from Peter Jacobi to start to get rid of 2002-06-11 10:08:16 +00:00
t4a.xml.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
t6.dtd applied a couple of patches from Peter Jacobi to start to get rid of 2002-06-11 10:08:16 +00:00
t6.dtd.err changed 'make tests' to use a concise output, scrolling to see where thing 2003-10-02 22:28:19 +00:00
t6.dtd.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
t6.xml applied a couple of patches from Peter Jacobi to start to get rid of 2002-06-11 10:08:16 +00:00
t6.xml.err applied a couple of patches from Peter Jacobi to start to get rid of 2002-06-11 10:08:16 +00:00
t6.xml.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
t8.xml applied a couple of patches from Peter Jacobi to start to get rid of 2002-06-11 10:08:16 +00:00
t8.xml.err Get rid of "blanks wrapper" for parameter entities 2017-06-20 13:19:47 +02:00
t8.xml.err.rdr Get rid of "blanks wrapper" for parameter entities 2017-06-20 13:19:47 +02:00
t8a.xml applied a couple of patches from Peter Jacobi to start to get rid of 2002-06-11 10:08:16 +00:00
t8a.xml.err Get rid of "blanks wrapper" for parameter entities 2017-06-20 13:19:47 +02:00
t8a.xml.err.rdr Get rid of "blanks wrapper" for parameter entities 2017-06-20 13:19:47 +02:00
t9.xml applied a couple of patches from Peter Jacobi to start to get rid of 2002-06-11 10:08:16 +00:00
t9.xml.err applied a couple of patches from Peter Jacobi to start to get rid of 2002-06-11 10:08:16 +00:00
t9.xml.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
t9a.xml applied a couple of patches from Peter Jacobi to start to get rid of 2002-06-11 10:08:16 +00:00
t9a.xml.err applied a couple of patches from Peter Jacobi to start to get rid of 2002-06-11 10:08:16 +00:00
t9a.xml.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
t10.xml implemented bugfix from Massimo Morara for DTD dumping problem. added 2004-06-24 02:24:44 +00:00
t10.xml.err implemented bugfix from Massimo Morara for DTD dumping problem. added 2004-06-24 02:24:44 +00:00
t10.xml.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
t11.xml fix a problem reported by Ashwin for system parameter entities referenced 2008-03-24 20:45:21 +00:00
t11.xml.err fix a problem reported by Ashwin for system parameter entities referenced 2008-03-24 20:45:21 +00:00
t11.xml.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
UTF16Entity.xml poblem with encoding detection for UTF-16 reported by Ashwin and found by 2008-03-06 14:37:10 +00:00
UTF16Entity.xml.err poblem with encoding detection for UTF-16 reported by Ashwin and found by 2008-03-06 14:37:10 +00:00
UTF16Entity.xml.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
xhtml1.xhtml Large batch of typo fixes 2019-09-30 18:04:38 +02:00
xhtml1.xhtml.err - added xmlRemoveProp 2000-01-03 11:08:02 +00:00
xhtml1.xhtml.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00
xlink.xml fixed #127877, never output &quot; in element content this changes the 2003-11-25 18:29:55 +00:00
xlink.xml.err Improve the error report on undefined REFs 2011-11-11 13:43:51 +08:00
xlink.xml.err.rdr Adding streaming validation to runtest checks 2012-10-25 15:39:39 +08:00