From 4ea0c96a40b0a9ac3bb373840c842958d784ddbb Mon Sep 17 00:00:00 2001 From: dotnet-bot Date: Sun, 13 Sep 2015 19:48:24 -0700 Subject: [PATCH] Fix mscorlib asmmeta and add SecurityCritical attribute to the two new functions in AssemblyExtensions [tfs-changeset: 1524637] Commit migrated from https://github.com/dotnet/coreclr/commit/8d7491b0ac6f7569f5a04587e5e0e3165066c5e6 --- .../src/mscorlib/src/System/Reflection/Metadata/AssemblyExtensions.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Metadata/AssemblyExtensions.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Metadata/AssemblyExtensions.cs index 64c0e5c..c7efad7 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Metadata/AssemblyExtensions.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Metadata/AssemblyExtensions.cs @@ -10,6 +10,7 @@ namespace System.Reflection.Metadata public static class AssemblyExtensions { [DllImport(JitHelpers.QCall)] + [SecurityCritical] // unsafe method [SuppressUnmanagedCodeSecurity] [return: MarshalAs(UnmanagedType.Bool)] private unsafe static extern bool InternalTryGetRawMetadata(RuntimeAssembly assembly, ref byte* blob, ref int length); @@ -22,6 +23,7 @@ namespace System.Reflection.Metadata // associated, is alive. The caller is responsible for keeping the assembly object alive while accessing the // metadata blob. [CLSCompliant(false)] // out byte* blob + [SecurityCritical] // unsafe method public unsafe static bool TryGetRawMetadata(this Assembly assembly, out byte* blob, out int length) { if (assembly == null) -- 2.7.4