[Mono-bugs] [Bug 79976][Nor] New - [PATCH] ResourceReader can't handle byte[].

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Nov 19 03:44:27 EST 2006


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 redforks at gmail.com.

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

--- shadow/79976	2006-11-19 03:44:27.000000000 -0500
+++ shadow/79976.tmp.4967	2006-11-19 03:44:27.000000000 -0500
@@ -0,0 +1,40 @@
+Bug#: 79976
+Product: Mono: Class Libraries
+Version: 1.2
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: redforks at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [PATCH] ResourceReader can't handle byte[].
+
+ResourceReader can't handle byte[].
+
+I made a patch, but lack some i/o check (for example, not enough bytes left
+in the buffer):
+
+Index: corlib/System.Resources/ResourceReader.cs
+===================================================================
+--- corlib/System.Resources/ResourceReader.cs   (revision 68052)
++++ corlib/System.Resources/ResourceReader.cs   (working copy)
+@@ -301,7 +301,7 @@
+                                        return new
+TimeSpan(reader.ReadInt64());
+
+                                case PredefinedResourceType.ByteArray:
+-                                       throw new NotImplementedException
+(PredefinedResourceType.ByteArray.ToString ());
++                                       return
+reader.ReadBytes(reader.ReadInt32());
+
+                                case PredefinedResourceType.Stream:
+                                        throw new NotImplementedException
+(PredefinedResourceType.Stream.ToString ());


More information about the mono-bugs mailing list