[Mono-devel-list] System.Text.ASCIIEncoding & Latin1Encoding fix

Aleksey Demakov avd at openlinksw.com
Wed Mar 5 05:45:47 EST 2003


Hi,

The GetString() method of System.Data.ASCIIEncoding and 
System.Data.Latin1Encoding throw an exception on zero
length byte array:

System.IndexOutOfRangeException: Array index is out of range
in <0x0005a> 00 System.Text.Latin1Encoding:GetString (byte[])
in <0x00082> 00 .TestGetString:Test (string,System.Text.Encoding)

The testcase and patch for the problem are attached.

Regards,
Aleksey
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.cs
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20030305/94c79dd4/attachment.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: output
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20030305/94c79dd4/attachment-0001.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: encoding.patch
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20030305/94c79dd4/attachment-0002.pl 


More information about the Mono-devel-list mailing list