[Mono-bugs] [Bug 52928][Nor] Changed - FromBase64 throws wrong exception on invalid input
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sun, 18 Jan 2004 06:25:28 -0500 (EST)
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 dave-mono@earth.li.
http://bugzilla.ximian.com/show_bug.cgi?id=52928
--- shadow/52928 2004-01-16 04:59:32.000000000 -0500
+++ shadow/52928.tmp.30548 2004-01-18 06:25:28.000000000 -0500
@@ -2,13 +2,13 @@
Product: Mono/Class Libraries
Version: unspecified
OS: other
OS Details:
Status: NEW
Resolution:
-Severity:
+Severity: Unknown
Priority: Normal
Component: CORLIB
AssignedTo: mono-bugs@ximian.com
ReportedBy: dave-mono@earth.li
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
@@ -64,6 +64,17 @@
Additional Information:
The problem is with looking up the encoded data in the lookup tables. They
seem to assume that they will only get valid data.
I might look into creating a better Base64 handling class at the weekend.
+
+------- Additional Comments From dave-mono@earth.li 2004-01-18 06:25 -------
+How does this patch look to people?
+
+Alternatives:
+
+ Just catching the IndexOutOfRange exception, and doing separate
+checks for the lookup table returning -1.
+
+ Pre-scanning the data to check that it is all valid. For whitespace
+ignoreing base64 this could be part of Filter().