Author: joncham
Date: 2007-05-11 15:53:11 -0400 (Fri, 11 May 2007)
New Revision: 77252

Modified:
   trunk/mcs/class/corlib/System.Runtime.InteropServices/ChangeLog
   trunk/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs
Log:
2007-05-11  Jonathan Chambers  <[EMAIL PROTECTED]>

        * Marshal.cs (SecureStringToBSTR): BSTR header is size in bytes,
        not string length.



Modified: trunk/mcs/class/corlib/System.Runtime.InteropServices/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Runtime.InteropServices/ChangeLog     
2007-05-11 19:40:23 UTC (rev 77251)
+++ trunk/mcs/class/corlib/System.Runtime.InteropServices/ChangeLog     
2007-05-11 19:53:11 UTC (rev 77252)
@@ -1,3 +1,8 @@
+2007-05-11  Jonathan Chambers  <[EMAIL PROTECTED]>
+
+       * Marshal.cs (SecureStringToBSTR): BSTR header is size in bytes,
+       not string length.
+
 2007-05-02  Jonathan Chambers  <[EMAIL PROTECTED]>
 
        * ExtensibleClassFactory.cs: Don't use un-implemented overload.

Modified: trunk/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs
===================================================================
--- trunk/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs    
2007-05-11 19:40:23 UTC (rev 77251)
+++ trunk/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs    
2007-05-11 19:53:11 UTC (rev 77252)
@@ -919,7 +919,7 @@
                        int len = s.Length;
                        IntPtr ctm = AllocCoTaskMem ((len+1) * 2 + 4);
                        byte [] buffer = null;
-                       WriteInt32 (ctm, 0, len);
+                       WriteInt32 (ctm, 0, len*2);
                        try {
                                buffer = s.GetBuffer ();
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to