40
40
#include <mono/metadata/security-core-clr.h>
41
41
#include <mono/metadata/attrdefs.h>
42
42
#include <mono/metadata/gc-internals.h>
43
- #include <mono/metadata/verify-internals.h>
44
43
#include <mono/metadata/mono-debug.h>
45
44
#include <mono/utils/mono-counters.h>
46
45
#include <mono/utils/mono-string.h>
@@ -128,9 +127,6 @@ mono_class_from_typeref_checked (MonoImage *image, guint32 type_token, MonoError
128
127
129
128
error_init (error );
130
129
131
- if (!mono_verifier_verify_typeref_row (image , (type_token & 0xffffff ) - 1 , error ))
132
- return NULL ;
133
-
134
130
mono_metadata_decode_row (t , (type_token & 0xffffff )- 1 , cols , MONO_TYPEREF_SIZE );
135
131
136
132
name = mono_metadata_string_heap (image , cols [MONO_TYPEREF_NAME ]);
@@ -1551,9 +1547,6 @@ mono_class_find_enum_basetype (MonoClass *klass, MonoError *error)
1551
1547
if (cols [MONO_FIELD_FLAGS ] & FIELD_ATTRIBUTE_STATIC ) //no need to decode static fields
1552
1548
continue ;
1553
1549
1554
- if (!mono_verifier_verify_field_signature (image , cols [MONO_FIELD_SIGNATURE ], error ))
1555
- goto fail ;
1556
-
1557
1550
sig = mono_metadata_blob_heap (image , cols [MONO_FIELD_SIGNATURE ]);
1558
1551
mono_metadata_decode_value (sig , & sig );
1559
1552
/* FIELD signature == 0x06 */
@@ -2711,20 +2704,13 @@ mono_class_name_from_token (MonoImage *image, guint32 type_token)
2711
2704
}
2712
2705
2713
2706
case MONO_TOKEN_TYPE_REF : {
2714
- ERROR_DECL (error );
2715
2707
guint32 cols [MONO_TYPEREF_SIZE ];
2716
2708
MonoTableInfo * t = & image -> tables [MONO_TABLE_TYPEREF ];
2717
2709
guint tidx = mono_metadata_token_index (type_token );
2718
2710
2719
2711
if (tidx > t -> rows )
2720
2712
return g_strdup_printf ("Invalid type token 0x%08x" , type_token );
2721
2713
2722
- if (!mono_verifier_verify_typeref_row (image , tidx - 1 , error )) {
2723
- char * msg = g_strdup_printf ("Invalid type token 0x%08x due to '%s'" , type_token , mono_error_get_message (error ));
2724
- mono_error_cleanup (error );
2725
- return msg ;
2726
- }
2727
-
2728
2714
mono_metadata_decode_row (t , tidx - 1 , cols , MONO_TYPEREF_SIZE );
2729
2715
name = mono_metadata_string_heap (image , cols [MONO_TYPEREF_NAME ]);
2730
2716
nspace = mono_metadata_string_heap (image , cols [MONO_TYPEREF_NAMESPACE ]);
@@ -2755,7 +2741,6 @@ mono_assembly_name_from_token (MonoImage *image, guint32 type_token)
2755
2741
return g_strdup (image -> assembly_name );
2756
2742
return g_strdup_printf ("%s" , image -> name ? image -> name : "[Could not resolve assembly name" );
2757
2743
case MONO_TOKEN_TYPE_REF : {
2758
- ERROR_DECL (error );
2759
2744
MonoAssemblyName aname ;
2760
2745
memset (& aname , 0 , sizeof (MonoAssemblyName ));
2761
2746
guint32 cols [MONO_TYPEREF_SIZE ];
@@ -2765,11 +2750,6 @@ mono_assembly_name_from_token (MonoImage *image, guint32 type_token)
2765
2750
if (idx > t -> rows )
2766
2751
return g_strdup_printf ("Invalid type token 0x%08x" , type_token );
2767
2752
2768
- if (!mono_verifier_verify_typeref_row (image , idx - 1 , error )) {
2769
- char * msg = g_strdup_printf ("Invalid type token 0x%08x due to '%s'" , type_token , mono_error_get_message (error ));
2770
- mono_error_cleanup (error );
2771
- return msg ;
2772
- }
2773
2753
mono_metadata_decode_row (t , idx - 1 , cols , MONO_TYPEREF_SIZE );
2774
2754
2775
2755
idx = cols [MONO_TYPEREF_SCOPE ] >> MONO_RESOLUTION_SCOPE_BITS ;
@@ -6378,11 +6358,6 @@ mono_field_resolve_type (MonoClassField *field, MonoError *error)
6378
6358
/* first_field_idx and idx points into the fieldptr table */
6379
6359
mono_metadata_decode_table_row (image , MONO_TABLE_FIELD , idx , cols , MONO_FIELD_SIZE );
6380
6360
6381
- if (!mono_verifier_verify_field_signature (image , cols [MONO_FIELD_SIGNATURE ], error )) {
6382
- mono_class_set_type_load_failure (klass , "%s" , mono_error_get_message (error ));
6383
- return ;
6384
- }
6385
-
6386
6361
sig = mono_metadata_blob_heap (image , cols [MONO_FIELD_SIGNATURE ]);
6387
6362
6388
6363
mono_metadata_decode_value (sig , & sig );
0 commit comments