[Mono-bugs] [Bug 68449][Nor] New - XPathDocument (XmlTextReader) crashes on parsing of doctype with some character entities

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 16 Oct 2004 10:44:04 -0400 (EDT)

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by beda@zirael.org.


--- shadow/68449	2004-10-16 10:44:04.000000000 -0400
+++ shadow/68449.tmp.32107	2004-10-16 10:44:04.000000000 -0400
@@ -0,0 +1,63 @@
+Bug#: 68449
+Product: Mono: Class Libraries
+Version: unspecified
+OS Details: Gentoo Linux 2004.2
+Status: NEW   
+Priority: Normal
+Component: Sys.XML
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: beda@zirael.org               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: XPathDocument (XmlTextReader) crashes on parsing of doctype with some character entities
+Description of Problem:
+XPathDocument crashes (the exception is thrown by
+System.Xml.XmlTextReader:ReadText (bool)) on reading of a document having
+some character entities in the doctype definition.
+Here is a simple xml document that triggers the exception:
+<!DOCTYPE book [
+<!ENTITY afr  "&#x1D51E;" >
+The first line of the exception report is: 
+Unhandled Exception: System.Xml.XmlException: Not allowed character was
+found. Line 1, position 0.
+which itself is a problem, because there is not unallowed character on
+position (1,0), the problem part is the &#x1D51E; character reference
+(however it should not throw exception at all as this is a character
+allowed by the XML specification (http://www.w3.org/TR/REC-xml/#NT-Char))
+When this reference occurs inside the body of an xml document, an exception
+is not triggered.
+Steps to reproduce the problem:
+Actual Results:
+exception raised
+Expected Results:
+document read
+How often does this happen? 
+Additional Information:
+I am using mono-1.0.2
+It does not happen on all character references, just some of them.