projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
4e4e92f
)
[bug] Prevent a GetMethodBody call on a dynamic method. Fixes 665788
author
Jb Evain
<jbevain@gmail.com>
Thu, 20 Jan 2011 15:37:21 +0000
(16:37 +0100)
committer
Jb Evain
<jbevain@gmail.com>
Thu, 20 Jan 2011 15:37:21 +0000
(16:37 +0100)
mono/metadata/reflection.c
patch
|
blob
|
history
diff --git
a/mono/metadata/reflection.c
b/mono/metadata/reflection.c
index 29a05d38b961c4fa487263522b29a980cbc23684..255bf9671c775ac05357b837503a7bdeb1f5e81d 100644
(file)
--- a/
mono/metadata/reflection.c
+++ b/
mono/metadata/reflection.c
@@
-6861,6
+6861,10
@@
mono_method_body_get_object (MonoDomain *domain, MonoMethod *method)
unsigned char format, flags;
int i;
+ /* for compatibility with .net */
+ if (method->dynamic)
+ mono_raise_exception (mono_get_exception_invalid_operation (NULL));
+
if (!System_Reflection_MethodBody)
System_Reflection_MethodBody = mono_class_from_name (mono_defaults.corlib, "System.Reflection", "MethodBody");
if (!System_Reflection_LocalVariableInfo)