[Mono-bugs] [Bug 415628] New: Bad UTF-8 sequences result in a crash

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Aug 7 18:26:23 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=415628


           Summary: Bad UTF-8 sequences result in a crash
           Product: Mono: Class Libraries
           Version: 2.0
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: tedu at fogcreek.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=232372)
 --> (https://bugzilla.novell.com/attachment.cgi?id=232372)
test case

Test case attached.  Expected result is "done".  Actually results in:

Unhandled Exception: System.ArgumentException: Arg_InsufficientSpace
Parameter name: chars
  at System.Text.UTF8Encoding.InternalGetChars (System.Byte* bytes, Int32
byteCount, System.Char* chars, Int32 charCount, System.UInt32& leftOverBits,
System.UInt32& leftOverCount, System.Object provider,
System.Text.DecoderFallbackBuffer& fallbackBuffer, System.Byte[]& bufferArg,
Boolean flush) [0x00000] 
  at System.Text.UTF8Encoding.InternalGetChars (System.Byte[] bytes, Int32
byteIndex, Int32 byteCount, System.Char[] chars, Int32 charIndex,
System.UInt32& leftOverBits, System.UInt32& leftOverCount, System.Object
provider, System.Text.DecoderFallbackBuffer& fallbackBuffer, System.Byte[]&
bufferArg, Boolean flush) [0x00000] 
  at System.Text.UTF8Encoding.GetChars (System.Byte[] bytes, Int32 byteIndex,
Int32 byteCount, System.Char[] chars, Int32 charIndex) [0x00000] 
  at System.Text.Encoding.GetChars (System.Byte[] bytes, Int32 index, Int32
count) [0x00000] 
  at System.Text.Encoding.GetString (System.Byte[] bytes, Int32 index, Int32
count) [0x00000] 
  at System.Text.UTF8Encoding.GetString (System.Byte[] bytes, Int32 index,
Int32 count) [0x00000] 
  at System.Text.Encoding.GetString (System.Byte[] bytes) [0x00000] 
  at Fun.Boom.Main () [0x00000] 


I also observed occasional segfaults until I validated strings myself.


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


More information about the mono-bugs mailing list