You've already forked linux-packaging-mono
Imported Upstream version 5.12.0.220
Former-commit-id: c477e03582759447177c6d4bf412cd2355aad476
This commit is contained in:
parent
8bd104cef2
commit
8fc30896db
@ -14,7 +14,18 @@ namespace System.Net
|
||||
|
||||
if (secureString == null || secureString.Length == 0)
|
||||
return String.Empty;
|
||||
|
||||
#if MONO
|
||||
try
|
||||
{
|
||||
bstr = Marshal.SecureStringToGlobalAllocUnicode(secureString);
|
||||
plainString = Marshal.PtrToStringUni(bstr);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (bstr != IntPtr.Zero)
|
||||
Marshal.ZeroFreeGlobalAllocUnicode(bstr);
|
||||
}
|
||||
#else
|
||||
try
|
||||
{
|
||||
bstr = Marshal.SecureStringToBSTR(secureString);
|
||||
@ -25,6 +36,7 @@ namespace System.Net
|
||||
if (bstr != IntPtr.Zero)
|
||||
Marshal.ZeroFreeBSTR(bstr);
|
||||
}
|
||||
#endif
|
||||
return plainString;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user