From 8d7491b0ac6f7569f5a04587e5e0e3165066c5e6 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] --- .../src/System/Reflection/Metadata/AssemblyExtensions.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mscorlib/src/System/Reflection/Metadata/AssemblyExtensions.cs b/src/mscorlib/src/System/Reflection/Metadata/AssemblyExtensions.cs index 64c0e5cb2353..c7efad77d42e 100644 --- a/src/mscorlib/src/System/Reflection/Metadata/AssemblyExtensions.cs +++ b/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 @@ public static class AssemblyExtensions // 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)