[Mono-bugs] [Bug 539929] New: XDocument.Load(XmlReader) doesn't check for a null Settings property

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Sep 17 09:54:18 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=539929


           Summary: XDocument.Load(XmlReader) doesn't check for a null
                    Settings property
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.XML
        AssignedTo: atsushi at ximian.com
        ReportedBy: james.bird at realtimeworlds.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Description of Problem:

When you construct an XmlTextReader using the following constructor:

- XmlTextReader( TextReader )

It will set its 'Settings' property to null. If you then pass this XmlReader to
XDocument.Load, it will throw a null reference exception because it trys to
clone the reader's 'Settings' property, without checking if it is null.

Steps to reproduce the problem:

XmlReader originalReader = new XmlTextReader(new StringReader("<a/>"));
XDocument.Load(originalReader);

Actual Results:

XDocument.Load throws a null reference exception because it doesn't check for a
null 'Settings' property.

Expected Results:

XDocument.Load succeeds (it succeeds on the Microsoft implementation of the
class libraries).

How often does this happen? 

Always

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list