Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/cecil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbevain <jbevain@gmail.com>2011-04-24 17:32:40 +0400
committerjbevain <jbevain@gmail.com>2011-04-24 17:32:40 +0400
commit5df2a203735917142cccb8bb80f9f8703dd9a0e2 (patch)
treea46d99097989650a2e13299f98fc5c51f764b3ae /Mono.Cecil
parentf5c964276099fd4896ebb51294e6703a3bc6acbd (diff)
Avoid crashes with some obfuscated assemblies
Diffstat (limited to 'Mono.Cecil')
-rw-r--r--Mono.Cecil/AssemblyReader.cs4
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);