[Mono-bugs] [Bug 59142][Nor] New - ReadBase64 of XmlTextReader throws exception.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 26 May 2004 18:26:38 -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 carsten@hess.net.

http://bugzilla.ximian.com/show_bug.cgi?id=59142

--- shadow/59142	2004-05-26 18:26:38.000000000 -0400
+++ shadow/59142.tmp.20141	2004-05-26 18:26:38.000000000 -0400
@@ -0,0 +1,46 @@
+Bug#: 59142
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.XML
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: carsten@hess.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: ReadBase64 of XmlTextReader throws exception.
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+
+Steps to reproduce the problem:
+1. create an xml document with several empty elements
+2. try to read the content of these empty elements with the XmlTextReader
+and the method int ReadBase64( byte[], int, int)
+3. Note the exception "Invalid Base 64 character". Microsft .Net 1.0 and
+1.1 return gracefully by not reading anything and returning 0. 
+
+Actual Results:
+exception "Invalid Base 64 character"
+
+Expected Results:
+Microsft .Net 1.0 and 1.1 return gracefully by not reading anything and
+returning 0. 
+
+How often does this happen? 
+every time with empty elements in an xml documetn
+
+Additional Information:
+This can easily be fixed by adding 
+  if (IsEmptyElement)
+       return 0;
+
+in the beginning of the ReadBase64() method implementation