Skip to content

Commit

Permalink
Fix mscorlib asmmeta and add SecurityCritical attribute to the two ne…
Browse files Browse the repository at this point in the history
…w functions in AssemblyExtensions

[tfs-changeset: 1524637]
  • Loading branch information
dotnet-bot committed Sep 14, 2015
1 parent 003a8b1 commit 8d7491b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)
Expand Down

0 comments on commit 8d7491b

Please sign in to comment.