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

           Summary: System.IO.MemoryStream is too eager in zeroing data
           Product: Mono: Class Libraries
           Version: 1.2
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]
          Found By: ---


When a MemoryStream that was created around an array is shrinked and the
expanded, it should no longer allow access to the elements that were present in
the array before the shrink. However, MS.Net MemoryStream does this by zeroing
the underlying array when the expansion is performed  - mono clears the array
on shrink. This is somewhat of a corner case, but the behaviour differes none
the less. Also, clearing on expansion improves performance a bit (well, at
least when the MemoryStream is only shrinked - it changes nothing when a
shrink/expand cycle is performed). A test case (passing on MS.Net) is attached.


-- 
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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to