diff options
author | jbevain <jbevain@gmail.com> | 2011-04-24 17:32:40 +0400 |
---|---|---|
committer | jbevain <jbevain@gmail.com> | 2011-04-24 17:32:40 +0400 |
commit | 5df2a203735917142cccb8bb80f9f8703dd9a0e2 (patch) | |
tree | a46d99097989650a2e13299f98fc5c51f764b3ae /Mono.Cecil | |
parent | f5c964276099fd4896ebb51294e6703a3bc6acbd (diff) |
Avoid crashes with some obfuscated assemblies
Diffstat (limited to 'Mono.Cecil')
-rw-r--r-- | Mono.Cecil/AssemblyReader.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Mono.Cecil/AssemblyReader.cs b/Mono.Cecil/AssemblyReader.cs index 63d3d83..0bb2407 100644 --- a/Mono.Cecil/AssemblyReader.cs +++ b/Mono.Cecil/AssemblyReader.cs @@ -1842,7 +1842,7 @@ namespace Mono.Cecil { range.Length++; } - if (owner != MetadataToken.Zero) + if (owner != MetadataToken.Zero && !ranges.ContainsKey (owner)) ranges.Add (owner, range); return ranges; @@ -2475,7 +2475,7 @@ namespace Mono.Cecil { return; } - reader.ReadByte (); + reader.position++; var count = reader.ReadCompressedUInt32 (); var attributes = new Collection<SecurityAttribute> ((int) count); |